Fixed caching() function, and those that depend on it.