You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Few cashes can store data from the same table, data is gathered by different sql queries;
Having file based cache allows me to create a folder per database and then reset it by tags, having tags allows me to generate keys like md5 of a sql query.
Is something like this possible?
memcache_set() - add tags parameter type text[] at the end
memcache_flush_tags(tags text[], optional policy smallint) - new function, policy can be ALL or ANY tags.
Thank you in advance.
The text was updated successfully, but these errors were encountered:
I don't think the flush command in memcache supports tags, so you'd have to delete all individual keys separately which is pretty clumsy. You could, however, just create your own wrapper functions around pgmemcache that use your custom tags in all operations and just update the tag when you want to stop using the values with the old tag.
One way to do it would be to have a table that contains your tag and SQL language functions that select that tag and prepend or append it to the key you're using. Another way would be to just embed that tag directly in your function definition.
One application I implemented had versioned database tables and functions and always stored values in the database in JSON format with the current software version included in the value. That way the keys remained the same across software versions (and different software versions running simultaneously wouldn't see different data), but if the software version on the frontend didn't match the version in the cached value the cache was ignored.
Hi,
Here's situation:
Is something like this possible?
Thank you in advance.
The text was updated successfully, but these errors were encountered: