Set timeouts for our memcached caches.

The policy this implements is:
* 1 week for most persistent data (Clients, etc.)
* 1 day for messages

(imported from commit d57bb2c6b9626ffa2155c6d0ef9b60827d1f2381)
This commit is contained in:
Tim Abbott
2013-03-26 14:09:45 -04:00
parent e2d010ef2d
commit e8aa77c9b4
5 changed files with 15 additions and 12 deletions

View File

@@ -110,7 +110,8 @@ def compute_mit_user_fullname(email):
traceback.print_exc()
return email.lower()
@cache_with_key(lambda realm, email: user_profile_by_email_cache_key(email))
@cache_with_key(lambda realm, email: user_profile_by_email_cache_key(email),
timeout=3600*24*7)
@transaction.commit_on_success
def create_mit_user_if_needed(realm, email):
try: