Refactored cache classes, removed unused ints

Refactored cache related classes, removed unused static ints in all
classes.