make separate module for cache encapsulation