https://github.com/dakrauth/cachely
Super simple URL content caching
https://github.com/dakrauth/cachely
caching python
Last synced: 10 months ago
JSON representation
Super simple URL content caching
- Host: GitHub
- URL: https://github.com/dakrauth/cachely
- Owner: dakrauth
- License: mit
- Created: 2018-02-16T22:24:47.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T02:39:13.000Z (over 1 year ago)
- Last Synced: 2025-07-19T02:55:43.946Z (11 months ago)
- Topics: caching, python
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=======
Cachely
=======
A very simplistic resource caching utility for retrieving and storing
web content locally to either the file system or SQLite database.
API
===
::
from cachely.client import Client
client = Client()
content = client.load_content("https://example.com")
CLI
===
::
$ cachely --help
usage: cachely [-h] [--list] [--delete] [--purge] [--ttl TTL] [--dirname DIRNAME] [--filename FILENAME] [--backend BACKEND] [--info] [--verbose] [URL]
positional arguments:
URL
options:
-h, --help show this help message and exit
--list, -l Show a listing of cached URLs.
--delete Delete the entry for a given URL or ID.
--purge Purge all cached entries.
--ttl TTL, -t TTL Set the time-to-live value in days for a new entry.
--dirname DIRNAME, -d DIRNAME
Directory location to use for database/files.
--filename FILENAME, -f FILENAME
Filename to use for sqlite database, if used.
--backend BACKEND, -b BACKEND
Specify cache storage: FILE, DB, or python import string for backend
--info Show cache info and exit.
--verbose, -v Toggle debug output.