Skip to content

Instantly share code, notes, and snippets.

View MaximilianFranz's full-sized avatar
😎
keep it moving

Maximilian Franz MaximilianFranz

😎
keep it moving
View GitHub Profile
@msiemens
msiemens / gist:5143963
Created March 12, 2013 15:40
A simple Python file caching decorator, caching the function's response till the given file has been changed.
import os
import inspect
from functools import wraps
_file_cache = {}
def cache_file(path):
def cache_is_fresh(name):