Pull requests

#5 Open
Repository
codeinthehole
Branch
default
Repository
jmoiron
Branch
default

CommittingTransactionMiddleware now commits for each DB in DATABASES setting

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default https://bitbucket.org/codeinthehole/johnny-cache
hg merge 8766f3daae61
hg commit -m 'Merged in codeinthehole/johnny-cache (pull request #5)'
Author
  1. David Winterbottom
Reviewers
Description

This was required to ensure queries to a read slave are still cached. By default Django only manages a transaction for the default database and so there is not commit on queries to other DBs, hence they don't get cached.

This commit just updates the middleware to manage a transaction for each database.

This may be overkill - it might be better to have a setting which controls which database aliases are covered by johnny-cache.

  • Learn about pull requests

Comments (0)