cache: restore flagging entries written into cache

This was probably lost during the cache backend rewrite in 2.x

fixes #332
in 10 minutes and 9 seconds and was queued for 7 seconds
latest