ogallagher / tejos_textiles

An online arts journal for publishing works in a new medium
MIT License
1 stars 0 forks source link

Cache server entry expiration #35

Closed ogallagher closed 4 years ago

ogallagher commented 4 years ago

I’m setting up the db server so that collections get added to the memcache for quick access, but with this scenario I realize that cache entries will need a TTL/expiration system so that they can be updated. In the case of a collection, an entry for collection_editors_choice might only need to be updated once per week, while collection_top_played and collection_top_rated would need to be cleared from the cache server more frequently.

EDIT: I forgot there’s already an expires argument in the cache.set(...) method, so I can just customize that argument for different entries.