Crates.io | fclicache |
lib.rs | fclicache |
version | 1.0.2 |
source | src |
created_at | 2024-02-10 11:38:55.211783 |
updated_at | 2024-02-19 23:56:13.306212 |
description | fclicache is a command-line utility that caches the output of resource-intensive commands, enabling faster retrieval of results when the same commands are executed repeatedly within a specified Time-to-Live (TTL) period. |
homepage | https://github.com/Miyoshi-Ryota/fclicache |
repository | https://github.com/Miyoshi-Ryota/fclicache |
max_upload_size | |
id | 1134885 |
size | 31,202 |
fclicache is a command-line utility that caches the output of resource-intensive commands, enabling faster retrieval of results when the same commands are executed repeatedly within a specified Time-to-Live (TTL) period. This tool is designed to enhance efficiency and save time, particularly in development environments where certain commands are run frequently.
Before installing fclicache, ensure you have Rust and Cargo installed on your system. If not, follow the installation guide here: https://www.rust-lang.org/tools/install.
To install fclicache, run the following command:
cargo install fclicache
To cache the output of a command using fclicache, wrap the desired command as follows:
fclicache --ttl [SECONDS] '[COMMAND]'
The tool caches the output of [COMMAND] for the duration specified by [SECONDS].
# First execution: the 'sleep 10 && date' command will take approximately 10 seconds.
$ fclicache --ttl 3600 'sleep 10 && date'
Sat Feb 10 19:07:49 JST 2024
# Second execution: results are instantly retrieved from cache, showing the same output as the first execution.
$ fclicache --ttl 3600 'sleep 10 && date'
Sat Feb 10 19:07:49 JST 2024
fclicache utilizes a simple file-based caching mechanism. This means that your command's output is written to a file. Therefore, it is advised not to use this tool for commands that produce sensitive or secure output.
We are very open to any contributions! Your input is invaluable to us, and we strive to make incorporating your suggestions and improvements as seamless as possible.
If you find fclicache
useful, consider giving it a star on GitHub! Your support motivates us to continuously improve and maintain the project.