caching refactoring

caching manager suitable for caching any type of content (need code
cleaning, check style, more verifications etc)
tests are refactored for new caching strategy