Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def get_recent_changes_from_cache(config_agent):
    folder_pages_full_path = config_agent.get_full_path("paths", "pages_path")
    path = os.path.join(folder_pages_full_path, ".zw_recent_changes_cache")

    if os.path.exists(path):
        stat = os.stat(path)

        if (time.time() - stat.st_mtime) > config_agent.config.getint("cache", "cache_update_interval"):
            update_recent_change_cache(folder_pages_full_path)
    else:
        update_recent_change_cache(folder_pages_full_path)

    with open(path) as f:
        buf = f.read()

    return web.utils.safeunicode(buf)
        


src/z/b/zbox_wiki-201212-r1/zbox_wiki/page.py   zbox_wiki(Download)
        req_path = req_path)
 
    buf = cache.get_recent_changes_from_cache(config_agent)
    all_lines = buf.split()
    total_lines = len(all_lines)

src/z/b/zbox_wiki-HEAD/zbox_wiki/page.py   zbox_wiki(Download)
        req_path = req_path)
 
    buf = cache.get_recent_changes_from_cache(config_agent)
    all_lines = buf.split()
    total_lines = len(all_lines)