Package gluon :: Module cache
[hide private]
[frames] | no frames]

Module cache

source code

This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Basic caching classes and methods

Classes [hide private]
  Cache
Sets up generic caching, creating an instance of both CacheInRam and CacheOnDisk.
  CacheAbstract
Abstract class for cache implementations.
  CacheAction
  CacheInRam
Ram based caching
  CacheOnDisk
Disk based cache
Functions [hide private]
 
lazy_cache(key=None, time_expire=None, cache_model='ram')
can be used to cache any function including in modules, as long as the cached function is only called within a web2py request if a key is not provided, one is generated from the function name the time_expire defaults to None (no cache expiration) if cache_model is "ram" then the model is current.cache.ram, etc.
source code
Variables [hide private]
  DEFAULT_TIME_EXPIRE = 300
  __package__ = 'gluon'
  have_settings = True
  logger = <logging.Logger object at 0x2564ad0>