★ wanayoo — archive 1999 https://github.com/Baseflow/flutter_cache_manager/issues/5Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe Cache Manager can be more flexible? #5

Closed
FastNinja opened this issue Feb 10, 2018 · 5 comments
Closed

Maybe Cache Manager can be more flexible? #5

FastNinja opened this issue Feb 10, 2018 · 5 comments

Comments

@FastNinja
Copy link

@FastNinja FastNinja commented Feb 10, 2018

Hi Rene,

Information about the files is stored in the shared preferences with the key "lib_cached_image_data". (Because images was the first use of this library :)) The date when the cache is last cleaned is stored as "lib_cached_image_data_last_clean".

You can actually pass this preferences in a Cache constructor (or in a getInstance() method) and your network image library will pass these keys (ib_cached_image_data).

Second point - it will probably be good to be able to have multiple cache managers. For example I will need to cache both document and data - and not sure if I will have same clean/keep configurations for both...

@FastNinja
Copy link
Author

@FastNinja FastNinja commented Feb 10, 2018

Another problem -like CacheManager generates unique ID when storing files locally.
on IOS the dialog that can preview documents requires a Path to the local copy and it reads and display it.
My app knows the actual file name but it is gone and Generated guid is presented (see screenshot below)
image

so basically I would like to be able to set a local file name for a file. I guess CacheManager need to created subfolder with GUID to make sure that file name are not clashed...

Any ideas?

@renefloor
Copy link
Collaborator

@renefloor renefloor commented Feb 14, 2018

I already have been thinking about the possibility of multiple cache managers. Using a custom key for that is indeed a good idea. Keeping the filename is indeed also not a bad idea.

@Panthro
Copy link

@Panthro Panthro commented Jun 3, 2018

This would definitely help with #20 !

@lifenautjoe
Copy link

@lifenautjoe lifenautjoe commented Nov 13, 2018

Flexible could be applied also to being able to flush the cache programatically. When the user logs out of the application leaving dangling cache files with user photos or more is a privacy concern. I see theres a _cleanCache method but is private. Would be great to have it exposed in the public API.

@renefloor
Copy link
Collaborator

@renefloor renefloor commented Nov 24, 2018

0.3.0-alpha.2 adds a lot of flexibility. Love to hear more specific feature requests if this is not enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.