Changeset 2733 for pykota

Show
Ignore:
Timestamp:
02/21/06 15:33:44 (19 years ago)
Author:
jerome
Message:

Improved cache flush for user and group print quota entries.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storage.py

    r2717 r2733  
    354354            self.parent.commitTransaction() 
    355355            if self.parent.usecache : 
    356                 for (k, v) in self.parent.caches["USERPQUOTAS"].items() : 
    357                     if v.User.Name == self.User.Name : 
    358                         self.parent.flushEntry("USERPQUOTAS", "%s@%s" % (v.User.Name, v.Printer.Name)) 
     356                self.parent.flushEntry("USERPQUOTAS", "%s@%s" % (self.User.Name, self.Printer.Name)) 
    359357            self.Exists = 0 
    360358         
     
    441439            self.parent.commitTransaction() 
    442440            if self.parent.usecache : 
    443                 for (k, v) in self.parent.caches["GROUPPQUOTAS"].items() : 
    444                     if v.Group.Name == self.Group.Name : 
    445                         self.parent.flushEntry("GROUPPQUOTAS", "%s@%s" % (v.Group.Name, v.Printer.Name)) 
     441                self.parent.flushEntry("GROUPPQUOTAS", "%s@%s" % (self.Group.Name, self.Printer.Name)) 
    446442            self.Exists = 0 
    447443