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

Module cfs

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)

Functions required to execute app components
--------------------------------------------

Note:
    FOR INTERNAL USE ONLY

Functions [hide private]
 
getcfs(key, filename, filter=None)
Caches the *filtered* file `filename` with `key` until the file is modified.
source code
Variables [hide private]
  cfs = {}
  cfs_lock = thread.allocate_lock()
  __package__ = 'gluon'
Function Details [hide private]

getcfs(key, filename, filter=None)

source code 

Caches the *filtered* file `filename` with `key` until the file is
modified.

Args:
    key(str): the cache key
    filename: the file to cache
    filter: is the function used for filtering. Normally `filename` is a
        .py file and `filter` is a function that bytecode compiles the file.
        In this way the bytecode compiled file is cached. (Default = None)

This is used on Google App Engine since pyc files cannot be saved.