diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-08-03 11:44:38 -0400 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-08-03 11:44:38 -0400 |
commit | 486eb3985782841cb5028e0ab4f31824238fba3c (patch) | |
tree | 4eb5b418d8c599a287dfa1a0683ff052b1bd27e8 /bin | |
parent | e4f095d560342ba3f93a3effeea1bae2b2b06983 (diff) | |
download | pykolab-486eb3985782841cb5028e0ab4f31824238fba3c.tar.gz |
Clean up the cache before attempting to insert anything
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/kolab_smtp_access_policy.py | 3 |
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() |