Skip to content

Add cache strategy #2

@attakei

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"

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