def __init__(self): self.duration_cacheStoreSet = 0.0 self.duration_permStoreSet = 0.0 self.duration_cacheStoreGet = 0.0 self.duration_permStoreGet = 0.0 self.cacheStore = CacheStore() self.permStore = PermStore() self.broker = None
A key is a dictionary with the following fields: {'object_id': site_id or exp_uid, 'type': site or exp or perm or temp, 'tries: number of tries - 0 means infinite, duration: time in seconds that key is valid - 0 is infinite} Usage: ############################### Initialization::\n keychain = KeyChain() """ from next.database_client.PermStore import PermStore from next.api.api_util import DatabaseException import random import time db = PermStore() class KeyChain: """ Provides and verifies keys for site, experiment, and widget access. Attributes: ::\n database_id (defaulted to "next_frontend_base") bucket_id (defaulted to "keys") """ def __init__(self): self.database_id = "next_frontend_base" self.bucket_id = "keys" return
def __init__(self): self.permStore = PermStore()