replace on layeredcache
better tests