aboutsummaryrefslogtreecommitdiff
path: root/man/man1/chc.1df
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-28 00:13:06 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-28 00:13:06 +1300
commit8215cba30d96b421ff0b434b5900fa60af5e1a4b (patch)
treee0a800d9f03580d8daf7524f40cafd8fe9e28061 /man/man1/chc.1df
parentMerge branch 'release/v4.0.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-8215cba30d96b421ff0b434b5900fa60af5e1a4b.tar.gz
dotfiles-8215cba30d96b421ff0b434b5900fa60af5e1a4b.zip
Merge branch 'release/v4.1.0'v4.1.0
* release/v4.1.0: Bump VERSION Correct typo in stub vimrc Remove some vestigial Bash 2.05 guards/comments Break up some long lines Two-space sentences in VimL comments Two-space sentences in shell comments Break up some long lines Fix long lines in manual pages Two-space sentences in manual pages Adjust sentence spacing of README.md Remove highlight double-quote VimL comment strings
Diffstat (limited to 'man/man1/chc.1df')
-rw-r--r--man/man1/chc.1df10
1 files changed, 6 insertions, 4 deletions
diff --git a/man/man1/chc.1df b/man/man1/chc.1df
index e447d7a7..9e0caaf3 100644
--- a/man/man1/chc.1df
+++ b/man/man1/chc.1df
@@ -13,19 +13,21 @@ CACHE_PATH DURATION COMMAND [ARG1...]
runs the command given in its third argument onwards, and saves the output in
the file with path given in the first argument, and on each subsequent request
before the duration in the second argument expires, it emits the content
-directly, rather than running the command. If it's run after the expiry date,
+directly, rather than running the command. If it's run after the expiry date,
it runs the command again, and refreshes the cache.
.P
This is intended as a quick way to just add three words in front of any given
-expensive command to prevent it running too often. This might be particularly
+expensive command to prevent it running too often. This might be particularly
useful if a script is called to get data far more often than it actually needs
to poll to get that data.
.P
-No file locking is implemented. If you need it, you're probably already at the
+No file locking is implemented. If you need it, you're probably already at the
point that you need to write a proper solution, but you could always use Linux
flock(1) or daemontool's setlock(1) in the command if you're stubborn:
.P
- flock -x /var/lock/example.chc chc /var/cache/example.chc 20 curl http://www.example.com/
+ flock -x /var/lock/example.chc \\
+ chc /var/cache/example.chc 20 \\
+ curl http://www.example.com/
.P
If you want to express the duration in human-readable terms, sec(1df) might be
useful too.