Skip to main content
Deno 2 is finally here 🎉️
Learn more
class ModHashCacheService
import { ModHashCacheService } from "https://deno.land/x/sptaki@1.2.0/services/cache/mod.ts";

Constructors

new
ModHashCacheService(
vfs: VFS,
hashUtil: HashUtil,
jsonUtil: JsonUtil,
logger: ILogger,
)

Properties

protected
hashUtil: HashUtil
protected
jsonUtil: JsonUtil
protected
logger: ILogger
protected
readonly
modCachePath: string
protected
modHashes: Record<string, string>
protected
vfs: VFS

Methods

calculateAndCompareHash(modName: string, modContent: string): boolean
calculateAndStoreHash(modName: string, modContent: string): void
getStoredValue(key: string): string
matchWithStoredHash(modName: string, hash: string): boolean
storeValue(key: string, value: string): void