fix if in function for CacheExtender