Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Request Manager > Customizing the Arbortext PE Request Manager > Writing a Custom Cache Manager > Implementing a Cache Manager > The search Method
  
The search Method
The most important method for a cache manager is the search method. It takes two parameters, the HTTP request received from a client and a flag indicating whether the cache entry matching the request (if one exists) should be locked. It must return a cache entry. If there is no entry in the cache that can fulfill the request for the client, it should create a substitute cache entry with a status code of NOT_CACHEABLE or CACHEABLE. The cache manager should return CACHEABLE to direct the Arbortext PE Request Manager to call the cache method to pass in the response for the request when one is produced.
The cache manager must lock the cache entry if it contains an IN_CACHE status and caller set the doLock parameter.