Management tools for managing the cache
Project description
sisu-cache-tools
================
Basic cache management tools for djangoCMS projects.
Implements a relatively automatic cache-invalidation capability and a 'precache' management command.
This is useful for sites that have largely static content and are using memcached.
Automated Cache invalidation
----------------------------
To get the automated cache-invalidation, add 'taints_cache = True' as a class-attribute on any models that contain objects that will change the way pages appear. Using signals, this module will detect changes to those model objects and invalidate the (entire) cache.
The cache can also be cleared with:
```` shell
python manage.py clearcache
````
Pre-emptive Caching
-------------------
When the operator is done with all of their changes, the might consider using:
```` shell
python manage.py precache
````
to make HTTP requests to every page found in the sitemaps defined in the ROOT_URLCONF. This will essentially preemptively load the pages into the cache so your visitors will get speedy access, even if they're the first one to 'hit' a given page.
Also, to simply review all of the URLs, the operator can use:
```` shell
python manage.py listurls
````
And it will print all of the known URLs to stdout.
================
Basic cache management tools for djangoCMS projects.
Implements a relatively automatic cache-invalidation capability and a 'precache' management command.
This is useful for sites that have largely static content and are using memcached.
Automated Cache invalidation
----------------------------
To get the automated cache-invalidation, add 'taints_cache = True' as a class-attribute on any models that contain objects that will change the way pages appear. Using signals, this module will detect changes to those model objects and invalidate the (entire) cache.
The cache can also be cleared with:
```` shell
python manage.py clearcache
````
Pre-emptive Caching
-------------------
When the operator is done with all of their changes, the might consider using:
```` shell
python manage.py precache
````
to make HTTP requests to every page found in the sitemaps defined in the ROOT_URLCONF. This will essentially preemptively load the pages into the cache so your visitors will get speedy access, even if they're the first one to 'hit' a given page.
Also, to simply review all of the URLs, the operator can use:
```` shell
python manage.py listurls
````
And it will print all of the known URLs to stdout.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sisu-cache-tools-0.0.2.tar.gz
.
File metadata
- Download URL: sisu-cache-tools-0.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26535704fabf7967d3fb04bebaa3a84bec33ea1ead67997cc15e8ea3f8796ecf |
|
MD5 | 65a2b7d85708add9abae7e1dff4131d3 |
|
BLAKE2b-256 | 6a5b353e381cac5e75ec2bff457087f5bc02a8b3a7838a3ae897e1969484a07d |