lflare / mdathome-golang

An unofficial rewrite of the official MangaDex@Home client, with focus on performance and reliability!
GNU Affero General Public License v3.0
27 stars 8 forks source link

Inconsistent diskcache size tracking #8

Closed sj0n closed 3 years ago

sj0n commented 3 years ago

I'm posting this assuming diskcache is tracking the /cache directory size. So what happened was my cache folder was full and the client wasn't able to run but according to the config it should be purging old cache when it reached the maximum cache allocated but it didn't so I had to manually delete old files within certain dates. After running the client again, for some reason it deleted all the files in the cache directory and continue its work like usual.

Yesterday I was reading the logs and I found several error saying the client could not find the files in the directory that it was trying delete, and this had me thinking the why was the client trying to delete old files when the cache directory size doesn't even reach the full capacity. Further reading into the logs, I found that the client shows the diskcache size as the maximum number that I had set when actually its doesn't reach its full capacity yet.

lflare commented 3 years ago

No, it does not track the directory size. It tracks the individual cache entries, and as such, can miss out on the cache.db file. Generally, you should always configure maximum cache size to be around 90-95% of your maximum disk space.

sj0n commented 3 years ago

Ah ok, so it's not an issue then. I'll close this.