coleifer / micawber

a small library for extracting rich content from urls
http://micawber.readthedocs.org/
MIT License
632 stars 91 forks source link

any examples to use Cache? #103

Closed hazho closed 3 years ago

hazho commented 3 years ago

guys; kindly provide us an example of view cache or in-template cache regarding to the documentation link

coleifer commented 3 years ago

The Cache instance is used when bootstrapping a provider-registry.


from micawber import Cache, bootstrap_oembed

cache = Cache()  # Simple in-memory cache.
pr = bootstrap_oembed(cache=cache)