Suor/django-cacheops — pull request #47 by ttyS15 (2013-09-18 21:39:15+00:00)
Title: Suggestion for improving database cluster support

Hi, Alexander

I want to improve supporting of database cluster in cacheops. In my opinion different aliases can contain different data for same queryset when database cluster is used. For example, model can be stored on several database shards with different aliases. Another case, master-slave replication always has natural non-zero lag.

I made modification in _cache_key(). Simple test is appended. Please review it.

If you want I can add switchers for this feature in SETTINGS and cache_profile. But I think it is unnecessarily because behavior seem to be expected for most cases. I see only one exception - cache_on_save functionality.

Thanks!