-
Notifications
You must be signed in to change notification settings - Fork 13
Description
In #46 @huyz asked about including some messaging like Command cached 2h 3m ago in bkt's output. My initial reaction was to say bkt should be transparent and shouldn't modify a command's output in any way, but the cache age is a piece of information only bkt knows, so it does seem like a potentially useful piece of data to expose in some way.
I think there's a lot of intricacies with including this information in bkt's output (e.g. in the thread there's discussion of how to format the time delta, and you'd presumably need some sort of format string support to enable different associated text like "Offline for", not to mention localization). So I'm hesitant to go that way, but maybe there's something reasonable we could do with that.
Another option would be a separate flag / command like --stats that prints some structured information about the cached data such as when it was last cached, so that a caller could query that information to compute a time delta and print the messaging they want. This could also be used to help inform when to --warm a cache, for example.
Just spitballing right now so please drop some comments if you would be interested in functionality along these lines (or start a separate discussion if that would be easier).