An open API service indexing awesome lists of open source software.

https://github.com/dsiner/cache

Cache ——Level 3 cache(memory, sdcard, network), abstract asynchronous time-consuming operation for any object, main thread callback, chained call. Get the first frame of the video, audio duration, imageloader, image compress; 3级缓存(内存, 本地, 网络), 针对任意对象,抽象异步耗时操作,主线程回调,链式调用. 获取视频第一帧/缩略图,音频时长, 图片加载,图片压缩等
https://github.com/dsiner/cache

cache cache-control cache-storage duration imagecompress imageloader thumbnail

Last synced: about 1 month ago
JSON representation

Cache ——Level 3 cache(memory, sdcard, network), abstract asynchronous time-consuming operation for any object, main thread callback, chained call. Get the first frame of the video, audio duration, imageloader, image compress; 3级缓存(内存, 本地, 网络), 针对任意对象,抽象异步耗时操作,主线程回调,链式调用. 获取视频第一帧/缩略图,音频时长, 图片加载,图片压缩等

Awesome Lists containing this project

README

          

# Cache for Android

[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![API](https://img.shields.io/badge/API-10%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=10)

> 3级缓存( `内存`, `本地`, `网络` ) ——针对任意对象,抽象异步耗时操作,主线程回调,链式调用

## Demo


Screenshot

## Implementation list
- [x] `FrameCache` - 获取本地或网络视频第一帧和时长
- [x] `DurationCache` - 获取本地或网络音频时长
- [x] `ImageCache` - 获取本地或网络图片

## Usage
```java
FrameCache.with(context).load(url).placeholder(R.color.colorAccent).into(view);
DurationCache.with(context).load(url).placeholder(0L).into(view);
ImageCache.with(context).load(url).into(ivImage);
...
```

More usage see [Demo](app/src/main/java/com/d/cache/MainActivity.java)

## Licence

```txt
Copyright 2017 D

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```