Skip to content

Commit ec1bd47

Browse files
committed
markdown -> rst
1 parent ce45842 commit ec1bd47

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ ve
22
*.pyc
33
*.db
44
*.egg-info
5+
build/
6+
dist/

README.md renamed to README.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
==================================
12
Django Fragment Cache Invalidation
23
==================================
34

45
Fragment cache invalidation by using a per model version token to prefix the cache keys. The version token can either be an internal memcached counter or a timestamped attribute from the model, such as `updated_at`.
56

6-
installation
7+
Installation
78
------------
89

910
Install with `pip` or with `python setup.py install` and add 'cachesweeper' to your `settings.INSTALLED_APPS`
@@ -16,7 +17,9 @@ An example setup; an article has many comments, each comment is cached, a single
1617

1718
**Template fragment caching**
1819

19-
`{% cachesweeper %}` takes a Django ORM model as its first argument, the expiry time as its second and any following arguments are used to construct the rest of the cache key.
20+
`{% cachesweeper %}` takes a Django ORM model as its first argument, the expiry time as its second and any following arguments are used to construct the rest of the cache key
21+
22+
::
2023

2124
{% load markup %}
2225
{% load cachesweeper_tags %}
@@ -33,6 +36,8 @@ An example setup; an article has many comments, each comment is cached, a single
3336
**Invalidating the fragment when the model changes**
3437

3538
On a post_save invalidate the cache for the given model. There are two options, either have Memcached keep an internal version counter for each model or using the keyword `using` as a means of versioning the cache.
39+
40+
::
3641
3742
from cachesweeper.utils import invalidate_cache_for
3843
@@ -50,3 +55,4 @@ On a post_save invalidate the cache for the given model. There are two options,
5055
invalidate_cache_for(article, using='updated_at')
5156
5257
post_save.connect(invalidate_article_cache, sender=Article)
58+

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def listify(filename):
99
url = 'http://github.com/smn/django-cache-sweeper',
1010
license = 'BSD',
1111
description = "Lazy Django fragment cache sweeping",
12-
long_description = open('README.md', 'r').read(),
12+
long_description = open('README.rst', 'r').read(),
1313
author = 'Simon de Haan',
1414
author_email = "[email protected]",
1515
packages = find_packages('src'),

0 commit comments

Comments
 (0)