Question

My web app serves a markdown convert for a directory, say that:

file = 'foo.md'
html = parse_markdown_file(file)
render_to_response(html)

Now I want to cache html result for each file, I can do it with Beaker. However, I want to invalidate the cache whenever the file is updated. But I don't know when it will be updated.

I have an idea that I can use a cache dependency on file's last modified time but don't know how to do this with Beaker. FYI: I use Pyramid and Beaker.

What should I do in this situation?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top