gf -server: add a command to manually flush the PGF cache

This can be used if the cloud service seems slow, but it would probably
be better to automatically expire unused PGFs from the cache after some time.
This commit is contained in:
hallgren
2014-03-19 16:15:05 +00:00
parent fd8cf9af58
commit 6cc8557e6b
3 changed files with 8 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ handle logLn documentroot state0 cache execute1 stateVar
-- "/start" ->
"/parse" -> parse (decoded qs)
"/version" -> return (ok200 gf_version)
"/flush" -> do PS.flushPGFCache cache; return (ok200 "flushed")
'/':rpath ->
-- This code runs without mutual exclusion, so it must *not*
-- use/change the cwd. Access files by absolute paths only.