summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-08-03 11:44:38 -0400
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-08-03 11:44:38 -0400
commit486eb3985782841cb5028e0ab4f31824238fba3c (patch)
tree4eb5b418d8c599a287dfa1a0683ff052b1bd27e8
parente4f095d560342ba3f93a3effeea1bae2b2b06983 (diff)
downloadpykolab-486eb3985782841cb5028e0ab4f31824238fba3c.tar.gz
Clean up the cache before attempting to insert anything
-rwxr-xr-xbin/kolab_smtp_access_policy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index f165be9..3c6adce 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -168,6 +168,9 @@ def cache_insert(sender, recipient, function, result, sasl_username='',sasl_send
return []
log.debug(_("Caching the policy result with timestamp %d") %((int)(time.time())), level=8)
+
+ cache_cleanup()
+
session.add(PolicyResult(key=function,value=result,sender=sender,recipient=recipient,sasl_username=sasl_username,sasl_sender=sasl_sender))
session.commit()