FileCache
final class FileCache
Package: dev.joid.lib.cache · Module: core · Source: FileCache.java
The cache folder of JOID, split into named areas whose entries expire when they go unused.
Description
Section titled “Description”Ask for an area by name with FileCacheArea.of and keep it in a constant (Keep files of your own in the cache).
JOID keeps its own areas there too (Know what JOID writes).
Every entry that has not been read for longer than the retention of its area is deleted when JOID starts. Use the cache for files that you can build again; data that must survive goes in the data folder.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
long | clean() static | Deletes the expired entries of every area of the cache folder, and the temporary files older than one day, then returns the number of bytes freed. |
Method details
Section titled “Method details”long clean() static
Deletes the expired entries of every area of the cache folder, and the temporary files older than one day, then returns the number of bytes freed. JOID runs it on a background thread when it starts and logs what it freed.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
