some optimizations in libshardcache