Fixed ineffective usage of caching