This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_cache_key(model, pk): | |
| """ | |
| Generates a cache key based on ``WRITE_CACHE_PREFIX``, the cache key prefix | |
| defined in the settings file (if any), the Django app and model name, and | |
| the primary key of the object. | |
| """ | |
| params = { | |
| 'prefix': getattr(settings, 'WRITE_CACHE_PREFIX', ''), | |
| 'app': model._meta.app_label, | |
| 'model': model._meta.object_name, |