Permalink
Browse files

Use `itervalues()` when iterating over cache regions

Suggested by Simon Koenig <simjoko@gmail.com>

Change-Id: Ie18c8d9d82b55124440fc2aad508c9525d766a89
  • Loading branch information...
1 parent d5e6ce9 commit a969475248fcaa350dc921b2ec52499d8c7fb84e @rtyler rtyler committed Jun 24, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 cheetah/Template.py
View
@@ -1329,8 +1329,8 @@ def refreshCache(self, cacheRegionId=None, cacheItemId=None):
"""
if not cacheRegionId:
- for key, cregion in self.getCacheRegions():
- cregion.clear()
+ for cacheRegion in self.getCacheRegions().itervalues():
+ cacheRegion.clear()
else:
cregion = self._CHEETAH__cacheRegions.get(cacheRegionId)
if not cregion:

0 comments on commit a969475

Please sign in to comment.