adding cache for a faster loading of index