1. A method of managing a cache, the method comprising the steps of: determining whether a received user query is answerable by said cache; querying a data source other than said cache when determining said user query is not answerable by said cache; storing results of said query in said cache, when space is available in said cache; determining whether benefit of maintaining existing query templates for said cache versus benefit of introducing a new set of query templates that includes a generalization of said user query, when the result of the query fetched from a directory server by a cache manager does not fit in said cache; and identifying and storing said introduced new set of query templates to be associated with said cache if said benefit of maintaining existing query templates for said cache is smaller than the sum of the benefits of said introduced new set of templates that includes a generalization of said user query.