Added proper cache handling

As now it's Shiro caches that needs to be cleared.