|
1 | 1 | # cachectrl
|
2 |
| -A tool to inspect and update an XML Resolver document cache |
| 2 | + |
| 3 | +A tool to inspect and update an XML Resolver document cache. |
| 4 | + |
| 5 | +The [XML Resolver](https://github.com/xmlresolver/xmlresolver) can be configured to |
| 6 | +automatically cache resources that it accesses on the web. This tool allows you to |
| 7 | +inspect and update the cache. |
| 8 | + |
| 9 | +It has five commands: show, inspect, create, update, and flush. These are accessed |
| 10 | +from the command line: |
| 11 | + |
| 12 | +``` |
| 13 | +Usage: CacheCtrl [options] [command] [command options] |
| 14 | + Options: |
| 15 | + -help, -h, --help |
| 16 | + Display help |
| 17 | + -cache-directory, -cache-dir |
| 18 | + Cache directory |
| 19 | + -verbose |
| 20 | + Verbose output |
| 21 | + Default: false |
| 22 | + Commands: |
| 23 | + show Show the contents of the cache |
| 24 | + Usage: show [options] |
| 25 | + Options: |
| 26 | + -regex, -r |
| 27 | + A regular expression to filter the entries shown |
| 28 | +
|
| 29 | + inspect Inspect the cache configuration |
| 30 | + Usage: inspect |
| 31 | +
|
| 32 | + create Create a new cache configuration |
| 33 | + Usage: create [options] |
| 34 | + Options: |
| 35 | + -age |
| 36 | + The maximum age each entry is allowed to be |
| 37 | + -delete |
| 38 | + The amount of time to wait before flushing a deleted entry |
| 39 | + -include |
| 40 | + Include matching pattern in cache? |
| 41 | + Default: true |
| 42 | + -pattern |
| 43 | + The URI regular expression pattern |
| 44 | + -size |
| 45 | + The maximum number of entries allowed |
| 46 | + -space |
| 47 | + The maximum space the entries are allowed |
| 48 | +
|
| 49 | + update Update a cache configuration |
| 50 | + Usage: update [options] |
| 51 | + Options: |
| 52 | + -age |
| 53 | + The maximum age each entry is allowed to be |
| 54 | + -delete |
| 55 | + The amount of time to wait before flushing a deleted entry |
| 56 | + -include |
| 57 | + Include matching pattern in cache? |
| 58 | + Default: true |
| 59 | + -pattern |
| 60 | + The URI regular expression pattern |
| 61 | + -size |
| 62 | + The maximum number of entries allowed |
| 63 | + -space |
| 64 | + The maximum space the entries are allowed |
| 65 | +
|
| 66 | + flush Flush the cache |
| 67 | + Usage: flush [options] |
| 68 | + Options: |
| 69 | + -pattern |
| 70 | + The URI regular expression pattern |
| 71 | + -regex, -r |
| 72 | + A regular expression to filter the entries shown |
| 73 | +``` |
| 74 | + |
| 75 | +## show |
| 76 | + |
| 77 | +The `show` command will show you what is in the cache. |
| 78 | + |
| 79 | +## inspect |
| 80 | + |
| 81 | +The `inspect` command will show you how the cache is configured. The |
| 82 | +cache control parameters can be configured on a per-URI basis. For |
| 83 | +example, you could cache resources from some sites longer than others, |
| 84 | +or allow some to have larger caches. |
| 85 | + |
| 86 | +## create and update |
| 87 | + |
| 88 | +The `create` and `update` commands modify the cache control parameters |
| 89 | +for a particular pattern. They are the same except that the pattern |
| 90 | +you specify for `create` must not exist and the pattern you specify |
| 91 | +for `update` must exist. |
| 92 | + |
| 93 | +## flush |
| 94 | + |
| 95 | +The `flush` command will delete resources from the cache. |
| 96 | + |
0 commit comments