def get_cached_value(identifier, item, context, **kwargs):
 allow_cache = True
 if ('allow_cache' in kwargs):
  allow_cache = kwargs.pop('allow_cache')
 key = _get_cache_key_for_context(identifier, item, context, **kwargs)
 if (not allow_cache):
  return (key, None)
 return (key, cache.get(key))

def get_cached_value ( identifier , item , context , ** kwargs ) : allow_cache = True if ( 'allow_cache' in kwargs ) : allow_cache = kwargs . pop ( 'allow_cache' ) key = _get_cache_key_for_context ( identifier , item , context , ** kwargs ) if ( not allow_cache ) : return ( key , None ) return ( key , cache . get ( key ) )
get item from context cache by identifier accepts optional kwargs parameter allow_cache which will skip fetching the actual cached object .