add the cache hooks in server