dartoos-dev / json_cache

An object-oriented Flutter package for caching user data locally in json.
MIT License
17 stars 6 forks source link

List all keys #152

Closed Ai-Kiwi closed 1 month ago

Ai-Kiwi commented 4 months ago

Is there a way to list all keys? If not one should be created as this would allow for scanning over all cached data and seeing if it has been expired yet.

rafamizes commented 3 months ago

Hello,

Currently, there is no way to list all keys used in the cache. However, I loved your idea. Therefore, as soon as possible, I will implement a method like Future<List<String>> keys() to get all keys.

Ai-Kiwi commented 3 months ago

Hello,

Currently, there is no way to list all keys used in the cache. However, I loved your idea. Therefore, as soon as possible, I will implement a method like Future<List<String>> keys() to get all keys.

That sounds great it will help tons with my project. Thank you.

rafamizes commented 1 month ago

@Ai-Kiwi , First of all, thanks for opening this issue.

I want to let you know that I've just released JsonCache 4.0.0 that, among other improvements, implements your suggestion: list all keys — via method keys.

Check it out.

Cheers!

Ai-Kiwi commented 1 month ago

@Ai-Kiwi , First of all, thanks for opening this issue.

I want to let you know that I've just released JsonCache 4.0.0 that, among other improvements, implements your suggestion: list all keys — via method keys.

Check it out.

Cheers!

Thank you so much. I will definitely look into using it when i get a chance.