def update_cache(): global cached_info global cache_expiration if not cached_info or cache_expiration < time.time(): xmlrpc = XmlRpcServer (OWS_APPS_AUTH, OWS_Login.login_user, OWS_Login.login_password) cached_info = xmlrpc.get_user_apps() cache_expiration = time.time() + EXPIRATION
def update_cache(): global cached_info global cache_expiration if not cached_info or cache_expiration < time.time(): xmlrpc = XmlRpcServer(OWS_APPS_AUTH, OWS_Login.login_user, OWS_Login.login_password) cached_info = xmlrpc.get_user_apps() cache_expiration = time.time() + EXPIRATION