Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionManager._flush not working when using JOHNNY_CACHE_KEY in settings.DATABASES #31

Open
natethelen opened this issue Aug 14, 2013 · 0 comments

Comments

@natethelen
Copy link

Happens other places inside TransactionManager, anywhere this code is used:

c = self.local.mget('%s_%s_*' % (self.prefix, self._trunc_using(using)))

The problem is that the 'using' variable is the DB key, not the substituted JOHNNY_CACHE_KEY value. It is done correctly during the KeyGen.gen_table_key:

db = unicode(settings.DB_CACHE_KEYS[db])
...
return '%s_%s_table_%s' % (self.prefix, db, table)

which puts them into self.local correctly during the set. But since we are looking for keys to flush that are not there, the real ones never get flushed

natethelen added a commit to natethelen/johnny-cache that referenced this issue Aug 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant