Implimenting own caching method