Package mazealgo.model.server
Class SolutionCache
java.lang.Object
mazealgo.model.server.SolutionCache
Caches solved
Solutions on disk keyed by SHA-256 of the
maze's byte representation. A second solve request for the
same maze short-circuits the search and reads the cached solution
instead — orders of magnitude faster than re-running BestFirstSearch.
Storage layout: one serialized Solution per file under the
configured directory (default $TMPDIR/MazeAlgo/cache), named
<sha256>.sol.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SolutionCache
public SolutionCache() -
SolutionCache
-
-
Method Details
-
getCacheDir
-
get
-
put
-