Added Pagination function and modified the cacher