'Constructor'

def __init__(self, module=None):

    self.cache = (current.cache.ram, 60)
    self.context = None
    self.classes = Storage()
    if (not hasattr(current, 'model')):
        current.model = Storage(config=Storage(), components=Storage(), methods=Storage(), cmethods=Storage(), hierarchies=Storage())
    response = current.response
    if ('s3' not in response):
        response.s3 = Storage()
    self.prefix = module
    mandatory_models = ('auth', 'sync', 's3', 'gis', 'pr', 'sit', 'org')
    if (module is not None):
        if self.__loaded():
            return
        self.__lock()
        if ((module in mandatory_models) or current.deployment_settings.has_module(module)):
            env = self.model()
        else:
            env = self.defaults()
        if isinstance(env, (Storage, dict)):
            response.s3.update(env)
        self.__loaded(True)
        self.__unlock()
    return
