mirror of https://github.com/caronc/apprise
Updated persistent_storage (markdown)
parent
b6e5a27fd7
commit
a95db9e010
|
@ -50,6 +50,29 @@ The possible disk states are:
|
|||
```
|
||||
- `active`: The plugin contains data written into it's cached location.
|
||||
|
||||
|
||||
The CLI tool has Persistent Storage enabled by default using the operational mode of `auto`.
|
||||
- You can optionally specify `--storage-mode` allowing you to change ths; possibilities are `auto` (default), `flush`, and `memory`.
|
||||
- `auto`: This is the default option and pesistent storage is used when applicable (only the plugins that require it take advantage of local cache made available to them).
|
||||
- `flush`: Similar to `auto` except that any changes made are immediately flushed to disk. This mode creates a higher i/o but enforces the content on disk is the latest.
|
||||
- `memory`: Effectively turns off Persistent storage. No plugins are allowed to write to disk. This is exactly the way Apprise was prior ro the Persistent Storage feature.
|
||||
|
||||
### Storage Cleanup
|
||||
- To remove all accumulated persistent storage generated through the CLI tool, you can run the following:
|
||||
```bash
|
||||
apprise storage clean
|
||||
```
|
||||
- You can compliment this call by providing URL IDs and/or `--tag` (or `-g`) values to focus on only cleaning specific persistently cached data. For example:
|
||||
```bash
|
||||
# Assuming we want to target the URL ID of abc123xy
|
||||
apprise storage clean abc123xy
|
||||
```
|
||||
You can also clear cache based on tag references:
|
||||
|
||||
```bash
|
||||
# Assuming we want to target the URL(s) associated with the tag 'family'
|
||||
apprise storage clean --tag family
|
||||
```
|
||||
## Developer Usage
|
||||
|
||||
When developing your plugin, you can access the persistent storage via `self.store`. There are 2 main features:
|
||||
|
|
Loading…
Reference in New Issue