Code Monkey home page Code Monkey logo

Comments (1)

saaros avatar saaros commented on August 17, 2024

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.

from pgmemcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.