Skip to content

Commit e84e969

Browse files
[#253]: Add SQLite cache loader API docs
1 parent 5ffb1a7 commit e84e969

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

docs/reference/document-loaders/sqlite-cache-requests.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ hide: [toc]
1111
pip install 'PyLD[requests-cache]'
1212
```
1313

14+
::: pyld.SqliteCacheRequestsDocumentLoader
15+
options:
16+
show_root_heading: false
17+
show_bases: false
18+
heading_level: 3
19+
20+
When `sqlite_file_path` is omitted, the cache defaults to the platform user
21+
cache directory:
22+
23+
| OS | Default path |
24+
|----|--------------|
25+
| :simple-linux: Linux | `~/.cache/pyld/http_cache.sqlite` |
26+
| :simple-apple: macOS | `~/Library/Caches/pyld/http_cache.sqlite` |
27+
| :material-microsoft-windows-classic: Windows | `%LOCALAPPDATA%\pyld\http_cache.sqlite` |
28+
1429
`SqliteCacheRequestsDocumentLoader` retrieves remote JSON-LD documents and keeps
1530
them in a persistent [:simple-sqlite: SQLite](https://www.sqlite.org/) cache. It
1631
is useful for applications that repeatedly load the same remote contexts across
@@ -31,15 +46,6 @@ publishers can control how cached context documents are reused.
3146
3247
{{ example('document_loaders/sqlite_cache_basic.py', output_syntax='json') }}
3348

34-
When `sqlite_file_path` is omitted, the cache defaults to the platform user
35-
cache directory:
36-
37-
| OS | Default path |
38-
|----|--------------|
39-
| Linux | `~/.cache/pyld/http_cache.sqlite` |
40-
| macOS | `~/Library/Caches/pyld/http_cache.sqlite` |
41-
| Windows | `%LOCALAPPDATA%\pyld\http_cache.sqlite` |
42-
4349
??? note "Decisions"
4450
This page is influenced by the decision to
4551
[use `requests-cache` for persistent HTTP caching in synchronous Python code](/pyld/project/decisions/use-requests-cache-for-sync-http-caching-in-document-loaders/).

0 commit comments

Comments
 (0)