You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request GET /cache/purge/path/to/images/myimage.png to purge that image.
Request GET /cache/purge/images/my* to purge all images that start with my in that path.
Request GET /cache/purge/* to purge all the cache.
But how to purge / only?
If I try GET /cache/purge/ I get
*6 lua entry thread aborted: runtime error: /etc/nginx/lua/cache_multipurge.lua:73: attempt to call field 'sumhexa' (a nil value)
stack traceback:
coroutine 0:
/etc/nginx/lua/cache_multipurge.lua: in function 'purge_one'
/etc/nginx/lua/cache_multipurge.lua:91: in main chunk, client: 127.0.0.1
(...)
The text was updated successfully, but these errors were encountered:
It looks like my version of lua-md5 did not support the sumhexa function, so I solved it by removing the dependency altogether. Just replace the function purge_one() to let the OS do the md5 directly, rather than rely on the lua module. Pull request sent. #11
function purge_one()
os.execute( "VAR=$(echo -n "..cmp_cache_key.." | md5sum | awk '{print $1}'); find '"..cmp_cache_path.."' -name ${VAR} -type f -exec rm {} + " )
end
Hi
According to the docs:
But how to purge
/
only?If I try
GET /cache/purge/
I getThe text was updated successfully, but these errors were encountered: