Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Django 1.3 #5

Open
sneilan opened this issue May 26, 2011 · 0 comments
Open

Fix for Django 1.3 #5

sneilan opened this issue May 26, 2011 · 0 comments

Comments

@sneilan
Copy link

sneilan commented May 26, 2011

To make this software work on Django 1.3, I had to modify lines 46 & 47 in the cache_incr(self, key) function in ratelimitcache.py:

I changed these two lines:
cache._cache.add(key, '0', time=self.expire_after())
cache._cache.incr(key)

To:
cache.add(key, '0', self.expire_after())
cache.incr(key)

I must say, ratelimitcache is a great idea for throttling certain pages!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant