Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache strategy #2

Open
attakei opened this issue Apr 26, 2024 · 0 comments
Open

Add cache strategy #2

attakei opened this issue Apr 26, 2024 · 0 comments

Comments

@attakei
Copy link
Owner

attakei commented Apr 26, 2024

Overview

On spec of oEmbed, cache_age is defined in response parameters.

The suggested cache lifetime for this resource, in seconds. Consumers may choose to use this value or not.

I want to use as all as possible if there are defined spec.

Explains

CLI

# Be explicitly by option arguments
> oembed.py --use-cache http://example.com

# Refer config file for oEmbedPy
> cat $HOME/.local/etc/oembedpy.conf
use_cache = true
cache_expired = 3600

> oembed.py http://example.com

Sphinx extension

oembedpy_use_cache = True
oembedpy_cache_storage = "$HOME/.local/var/oembedpy/cache.db"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant