What is the Caching facility in the Naming Service for?
By turning caching on, we can dramatically improve performance when the backing store is slow. For example, in the case of JDBC adaptor, making a direct access on the database every time there is a resolve or bind operation is relatively slow. By caching the results, we can reduce the number of database accesses. There are a number of caveats to keep in mind when turning caching facility on. First, make sure that the Naming Service using the cache is the only Naming Service accessing the underlying data. If this is not the case, clients using Naming Service may get invalid data since the cache may contain stale data. And you have to know that you will only see improvements when the same piece of data is accessed more than once.
By turning caching on, we can dramatically improve performance when the backing store is slow. For example, in the case of JDBC adaptor, making a direct access on the database every time there is a resolve or bind operation is relatively slow. By caching the results, we can reduce the number of database accesses. There are a number of caveats to keep in mind when turning caching facility on. First, make sure that the Naming Service using the cache is the only Naming Service accessing the underlying data. If this is not the case, clients using Naming Service may get the wrong data since the cache may contain stale data. And you have to know that you will only see improvements when the same piece of data is accessed more than once.