Questions tagged [django-johnny-cache]

Johnny Cache is a caching framework for django applications. It works with the django caching abstraction, but was developed specifically with the use of memcached in mind. Its main feature is a patch on Django’s ORM that automatically caches all reads in a consistent manner. It works with Django 1.1 thru 1.4 and python 2.4 thru 2.7.

Resources

See also:

12 questions
2
votes
1 answer

Accessing Johnny Cache Data

I am relatively new to Python and was wondering if it is possible to access the results cached by Johnny Cache for further processing before returning the result e.g. running further queries on it. As a simplified example, consider we have a table…
RunLoop
  • 20,288
  • 21
  • 96
  • 151
2
votes
0 answers

Django Celery with Johnny Cache tasks failing with weird errors

I am running Django 1.4.5, Celery 3.0.15, Django Celery 3.0.11, Johnny Cache 1.4. The calls to ORM in celery tasks sometimes fail with weird errors like invalid literal for int() with base 10: 'a'" or
ustun
  • 6,941
  • 5
  • 44
  • 57
1
vote
0 answers

Cache invalidation while caching database in Django

I am fairly new to the concept of caching, trying to use a custom middleware to cache DB queries in django. I tried using Johnny cache but its cache invalidation logic isn't that optimised in my use case. I have a huge table, from which multiple…
Ayush Pallav
  • 919
  • 9
  • 18
1
vote
0 answers

Some queries not being queryset cached by django-cache-machine / django-johnny-cache

I am looking to cache some rarely updated data coming from several related tables in DB (MySQL to be specific). I have tried django ORM queryset caching with the above django apps but have stumbled into some weird behavior with both of them: some of…
Nick
  • 109
  • 5
1
vote
1 answer

Johnny Cache with template caching

I'm setting up Johnny Cache alongside template caching using Django 1.4. Our current setup looks like this: # Django Cache CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION':…
scoopseven
  • 1,767
  • 3
  • 18
  • 27
1
vote
0 answers

Disabling johnny-cache in admin

I am using johnny-cache. Is there an easy way to disable it from Admin, but let it work transparently everywhere else? I have looked in the johhny cache docs - http://pythonhosted.org/johnny-cache/, but can't seem to find this.
shabda
  • 1,668
  • 1
  • 18
  • 28
1
vote
0 answers

Modify Johnny Cache for SNS-Like Content

Johnny cache is good for table of readonly data or seldom updated data, like game meta table. It got table level versioning which will auto expire query cache on the target table if an update happens on it. For an SNS like application, UGC can…
Jason Xu
  • 2,903
  • 5
  • 31
  • 54
1
vote
2 answers

Django Johnny cache - include tables instead of exclude using MAN_IN_BLACKLIST?

I'm aware of Johnny cache's MAN_IN_BLACKLIST and JOHNNY_TABLE_BLACKLIST. Is there a way to specify the reverse? That is specify only the tables that need to be cached? I want to do this for the simple reason that we have over 200 tables in the…
ksrini
  • 1,412
  • 2
  • 19
  • 33
0
votes
1 answer

Django: 'BaseTable' object does not support indexing

I'm migrating my project to Django 1.8 and I am receiving an error related to 'johnny cache. Specifically in 'johnny/cache.py/'. Error: lib/python2.7/site-packages/johnny/cache.py", line 87, in get_tables_for_query tables = set([v[0] for v in…
Roshan
  • 60
  • 10
0
votes
1 answer

Johnny-cache and taggit-tags

I'm using johnny-cache (1.6.1a) and Django 1.6 for a project. I have a model that implements TaggableManger: class Publication(models.Model): title = models.CharField(max_length=255, db_index=True) editor = models.ForeignKey(Employee,…
Rob L
  • 3,634
  • 2
  • 19
  • 38
0
votes
1 answer

johnny cache 1.4 in Django 1.6 does not work?

I installed johnny-cache 1.4 in Django 1.6 using the instructions but does not work: # add johnny's middleware MIDDLEWARE_CLASSES = ( 'johnny.middleware.LocalStoreClearMiddleware', 'johnny.middleware.QueryCacheMiddleware', # ... ) # some…
user987055
  • 1,039
  • 4
  • 14
  • 25
0
votes
1 answer

Using the same cache for two sites

I am hosting two sites from my Django code base and I am using Johnny Cache for caching. I have individual settings.py and manage.py for both the sites. I have configured Johnny Cache for both of them. Now, what is required is that they share the…
Sandip Agarwal
  • 1,890
  • 5
  • 28
  • 42