disklrumulticache

Simple multipurpose cache

Лицензия

Лицензия

Группа

Группа

it.sephiroth.android.library.disklrumulticache
Идентификатор

Идентификатор

disklrumulticache
Последняя версия

Последняя версия

1.0.8
Дата

Дата

Тип

Тип

aar
Описание

Описание

disklrumulticache
Simple multipurpose cache
Ссылка на сайт

Ссылка на сайт

https://github.com/sephiroth74/DiskLruImageCache
Система контроля версий

Система контроля версий

https://github.com/sephiroth74/DiskLruImageCache

Скачать disklrumulticache

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/it.sephiroth.android.library.disklrumulticache/disklrumulticache/ -->
<dependency>
    <groupId>it.sephiroth.android.library.disklrumulticache</groupId>
    <artifactId>disklrumulticache</artifactId>
    <version>1.0.8</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/it.sephiroth.android.library.disklrumulticache/disklrumulticache/
implementation 'it.sephiroth.android.library.disklrumulticache:disklrumulticache:1.0.8'
// https://jarcasting.com/artifacts/it.sephiroth.android.library.disklrumulticache/disklrumulticache/
implementation ("it.sephiroth.android.library.disklrumulticache:disklrumulticache:1.0.8")
'it.sephiroth.android.library.disklrumulticache:disklrumulticache:aar:1.0.8'
<dependency org="it.sephiroth.android.library.disklrumulticache" name="disklrumulticache" rev="1.0.8">
  <artifact name="disklrumulticache" type="aar" />
</dependency>
@Grapes(
@Grab(group='it.sephiroth.android.library.disklrumulticache', module='disklrumulticache', version='1.0.8')
)
libraryDependencies += "it.sephiroth.android.library.disklrumulticache" % "disklrumulticache" % "1.0.8"
[it.sephiroth.android.library.disklrumulticache/disklrumulticache "1.0.8"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
commons-io : commons-io jar 2.4
com.jakewharton : disklrucache jar 2.0.2

Модули Проекта

Данный проект не имеет модулей.

DiskLruImageCache

Simple file based image cache

Include

Just add the following line to your build.gradle dependencies

compile "it.sephiroth.android.library.disklruimagecache:DiskLruImageCache:1.0.0"

Usage

DiskLruImageCache cache = new DiskLruImageCache( context, "my-unique-name", Integer.MAX_VALUE );

Read an entry from the cache

DiskLruImageCache.BitmapEntry entry = cache.get( "image-1", Metadata.class );

Write an entry

Metadata metadata = new Metadata();
metadata.value = 1;
DiskLruImageCache.BitmapEntry<Metadata> entry;
entry = new DiskLruImageCache.BitmapEntry<Metadata>( bitmap, metadata );
boolean success = cache.put( "image-1", entry, Bitmap.CompressFormat.JPEG, 70 );

The Metadata must be an instance of Parcelable, in this example is:

static class Metadata implements Parcelable {

	int value;

	public static final Parcelable.Creator<Metadata> CREATOR = new Parcelable.Creator<Metadata>() {
		public Metadata createFromParcel ( Parcel source ) {
			final Metadata f = new Metadata();
			f.value = source.readInt();
			return f;
		}

		@Override
		public Metadata[] newArray ( final int i ) {
			return new Metadata[0];
		}
	};

	@Override
	public int describeContents () {
		return 0;
	}

	@Override
	public void writeToParcel ( final Parcel parcel, final int i ) {
		parcel.writeInt( value );
	}
}

Версии библиотеки

Версия
1.0.8
1.0.6
1.0.5
1.0.3
1.0.2