ConversionCache

class ConversionCache(cacheFile: Path, maxEntries: Int = 500, plugin: JavaPlugin, logger: Logger)

Constructors

Link copied to clipboard
constructor(cacheFile: Path, maxEntries: Int = 500, plugin: JavaPlugin, logger: Logger)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun get(key: String): String?

Retrieves a cached conversion result by key.

Link copied to clipboard

Loads the conversion cache from disk into memory. If the cache file does not exist or version is incompatible, initializes it with an empty cache.

Link copied to clipboard
fun put(key: String, value: String)

Stores a conversion result in the cache.

Link copied to clipboard

Saves the conversion cache from memory to disk. This operation is performed asynchronously.