Cache library
refactoring