Skip to content

Add cache strategy #2

Description

@attakei

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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions