diff_cache 0.0.2 copy "diff_cache: ^0.0.2" to clipboard
diff_cache: ^0.0.2 copied to clipboard

Comparing and caching server files

diff_cache #

Comparing and caching server files,By comparing the ETag of the server file

Getting Started #

1.初始化 请放在main.dart DiffCache.init();

2.使用 DiffCache dc = DiffCache();

(1)添加缓存的文件地址和名称 await dc.tapAdd("缓存在本地的文件名称(可以用_,不建议使用其他的特殊字符)","文件地址");

(2)通过名称更新某一个文件 await dc.update((List

(3)通过名称强制更新文件 await dc.updateMust((List

(4)更新所有的文件 await dc.update((List

(4)强制更新所有的文件 await dc.updateMust((List

(5)通过名称读取缓存的文件 String fileContent = await dc.read("文件名称")

(6)删除某一个文件 dc.remove("文件名称");

(7)清空所有的文件 dc.clear();

0
likes
135
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

Comparing and caching server files

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, flutter, path_provider, plugin_platform_interface, shared_preferences, uuid

More

Packages that depend on diff_cache

Packages that implement diff_cache