def build(self, key, req, opened, entry): config = req.get_config() log=int(config.get("PythonDebug", 0)) if log: if entry._value is NOT_INITIALIZED: req.log_error('Publisher loading page %s'%req.filename, apache.APLOG_NOTICE) else: req.log_error('Publisher reloading page %s'%req.filename, apache.APLOG_NOTICE) return ModuleCache.build(self, key, req, opened, entry)
def check(self, key, req, entry): config = req.get_config() autoreload=int(config.get("PythonAutoReload", 1)) if autoreload==0 and entry._value is not NOT_INITIALIZED: # if we don't want to reload and we have a value, # then we consider it fresh return None else: return ModuleCache.check(self, key, req, entry)