Refactor cachinglayer get method
Change sort order of private methods in cachinglayer
Refactor helper functions in cachinglayer