Git Product home page Git Product logo

Comments (5)

erikrose avatar erikrose commented on August 15, 2024

+1 on this. We need tags to be memcacheable, and this is one piece of the puzzle.

from django-taggit.

alex avatar alex commented on August 15, 2024

I'm curious what you mean about making tags "memcachebale"?

from django-taggit.

erikrose avatar erikrose commented on August 15, 2024

For performance, we store the results of most of our queries in memcached using django-cache-machine. django-cache-machine inserts itself into the query process by means of a custom manager, which we must make the default manager of every model class. Short of monkeypatching (which I hate because it's hard to notice by looking at the code), we would need to not only subclass most of taggit's managers and models (fine) but also override any method in any of them that refers to any of the others. For example, TaggedItem.tags_for() refers to Tag by name, and we'd have to change it to point to our CachedTag class that has the caching custom manager.

Of course, this all points to a more general problem in Django—it doesn't have a component architecture (e.g. peak.binding or Zope-style components) and so makes this sort of loose coupling a one-off problem for everybody. I'm honestly not sure what the best solution is, so if you have any thoughts, I'm all ears!

from django-taggit.

alex avatar alex commented on August 15, 2024

I've got a branch with support for this and I've solicited feedback on the mailing list: http://groups.google.com/group/django-taggit

from django-taggit.

alex avatar alex commented on August 15, 2024

With the merger of the api-refactor branch this is possible.

from django-taggit.

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.