saoudrizwan / Disk

Easily persist structs, images, and data on iOS
MIT License
3.1k stars 170 forks source link

Feature Idea: Store data with expiration date #21

Closed tguidon closed 6 years ago

tguidon commented 6 years ago

Hey there, are there any plans to add expiration dates to the items being stored? In one of my applications, I want to store venue location data to the cache. Ideally I could store this and the data would expire in X time.

Thoughts?

saoudrizwan commented 6 years ago

Hey @tguidon, expiry is a bit out of Disk's scope, since Disk is more of a static wrapper around file system operations rather than a cache manager. I explained how you could accomplish expiry in general with Disk here: https://github.com/saoudrizwan/Disk/issues/15