<s> from pylons import app_globals <EOL> from pylons . decorators . cache import beaker_cache <EOL> from projectname . lib . base import BaseController <EOL> class CacheController ( BaseController ) : <EOL> @ beaker_cache ( key = None ) <EOL> def test_default_cache_decorator ( self ) : <EOL> app_globals . counter += <NUM_LIT:1> <EOL> return '<STR_LIT>' % app_globals . counter <EOL> @ beaker_cache ( key = "<STR_LIT>" , query_args = True ) <EOL> def test_get_cache_decorator ( self ) : <EOL> app_globals . counter += <NUM_LIT:1> <EOL> return '<STR_LIT>' % app_globals . counter <EOL> @ beaker_cache ( expire = <NUM_LIT:4> ) <EOL> def test_expire_cache_decorator ( self ) : <EOL> app_globals . counter += <NUM_LIT:1> <EOL> return '<STR_LIT>' % app_globals . counter <EOL> @ beaker_cache ( key = "<STR_LIT:id>" ) <EOL> def test_key_cache_decorator ( self , id ) : <EOL> app_globals . counter += <NUM_LIT:1> <EOL> return '<STR_LIT>' % ( app_globals . counter , id ) <EOL> @ beaker_cache ( key = [ "<STR_LIT:id>" , "<STR_LIT>" ] ) <EOL> def test_keyslist_cache_decorator ( self , id , id2 = "<STR_LIT>" ) : <EOL> app_globals . counter += <NUM_LIT:1> <EOL> return '<STR_LIT>' % ( app_globals . counter , id ) </s>
