cache now mirrors the database functionality for search