Package googleapiclient :: Package discovery_cache :: Module file_cache
[hide private]
[frames] | no frames]

Module file_cache

source code

File based cache for the discovery document.

The cache is stored in a single file so that multiple processes can share the same cache. It locks the file whenever accesing to the file. When the cache content is corrupted, it will be initialized with an empty cache.

Classes [hide private]
  Cache
A file based cache for the discovery documents.
Functions [hide private]
 
_to_timestamp(date) source code
 
_read_or_initialize_cache(f) source code
Variables [hide private]
  LOGGER = logging.getLogger(__name__)
  FILENAME = "google-api-python-client-discovery-doc.cache"
  EPOCH = datetime.datetime.utcfromtimestamp(0)
  cache = Cache(max_age= DISCOVERY_DOC_MAX_AGE)