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.
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, whilecollection_top_played
andcollection_top_rated
would need to be cleared from the cache server more frequently.EDIT: I forgot there’s already an
expires
argument in thecache.set(...)
method, so I can just customize that argument for different entries.