Created persistent_storage (markdown)

Chris Caron 2024-08-22 21:33:05 -04:00
parent 89942b677e
commit 2e326e4bc4

39
persistent_storage.md Normal file

@ -0,0 +1,39 @@
# Persistent Storage
Persistent Storage greatly reduces the API transactions between you and the service(s) you may use. Developers need to enable this but the Apprise CLI has this enabled by default.
For things like:
- The Matrix plugin: persistent cache allows login information to be cached locally for re-use (saving extra API calls to authenticate again each time).
- The Telegram plugin: persistent cache allows Apprise to remember your user account saving extra fetches to the service to determine it each and every time.
- Apprise stores all of it's persistent data in it's own directory unique to the Apprise URL you create. By default all directories are 8 characters in length and a combination of letters an numbers.
- All Apprise persistent files have a `.psdata` extension and are written to a cache directory chosen by you otherwise it defaults to the locations provided by your operating system.
## CLI Utilization
If using the CLI, this data file location used is:
- Microsoft Windows: `%APPDATA%/Apprise/cache`
- Linux: `~/.local/share/apprise/cache`
All Apprise URLs you define have a URL ID generated against them (`uid`). To see what URL ID's have been assigned to your URLs, simply just use the `--dry-run` and pair it with `--all` to see everything:
```bash
# Given the command:
apprise --dry-run --all
```
The output may look like this:<br/>
![Screenshot from 2024-08-22 21-06-24](https://github.com/user-attachments/assets/0ae95125-a9f0-40d6-8d1b-5c754b616dec)
Once you know the UID, you know the directory your persistent data can be found in. The takeaway from the screenshot above is:
1. Some plugins simply do not utilize persistent storage at all (denoted with `- n/a -`).
1. Reuse of Apprise URLs with the same login credentials share the same UID. It's the same upsream endpoint after all.
You can list the persistent storage by accessing the `storage` submention of the apprise cli:
```bash
# Given the command:
apprise storage
```
The output may look like this:<br/>
![Screenshot from 2024-08-22 21-27-39](https://github.com/user-attachments/assets/2383d487-b873-4290-960e-c2e360565771)
The takeaway from the screenshot above is this is another way of looking at the storage and how it's been assigned to the URLs.
- You can see the grouping of multiple URLs sharing the same storage endpoint is also listed here.
- It will identify the current amount of disk storage you have in use for the given plugin as well