Skip to content

chise0713/lru-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lru-cache

ipc

daemon => do the lru filtering job

client => ask daemon and output result

config example:

[[directory]]
path = "/home/user/.cargo/target"
tag = "rust_target"

[[directory]]
path = "/home/user/.cache"
tag = "cache_dir"

client example:

lru -rs 1GB | tr '\0' '\n' | less
lru -rs 1GB | xargs -0 rm -vf

usages:

daemon:

usage: lru-daemon [-h] [-c config] [-s socket]
Command Summary:
        -c              config path
        -h              prints this help message
        -s              socket path

client:

usage: lru [-hr] [-d daemon] [-p path] [-s size] [-t tag]
Command Summary:
        -d              daemon socket path
        -h              prints this help message
        -p              a directory path to calculate evictation, no input equals all.
        -r              output raw data, NUL terminated string slice.
        -s              clean until below the given limit, e.g. 1MiB
        -t              a tag of configured directory tag, behavior same as path
Copyright (C) 2026 chise0713

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages