| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <html> |
| <body> |
| <h2>Memcache EntityStore CachePool.</h2> |
| <p>Memcache has no namespace support. In addition to that, the protocol disallow key listing.</p> |
| <p>The CachePool contract is to drop a cache once all of its references have been returned.</p> |
| <p>Therefore, all keys are prefixed, that way;</p> |
| <pre>cacheId.cacheInstanceId.key</pre> |
| <ul> |
| <li><code>cacheId</code> is the identity of the requested cache</li> |
| <li><code>cacheInstanceId</code> is an autogenerated cache instance identifier</li> |
| <li><code>key</code> is the original key</li> |
| </ul> |
| <p> |
| In other words and for a given <code>cacheId</code>, once all references of the Cache are returned to the |
| CachePool, the next <code>fetchCache(..)</code> invocation will generate a new Cache instance identifier and |
| hence use different prefixed keys. |
| </p> |
| <p> |
| All this allow the Memcache EntityStore CachePool to conform to the CachePool contract despite limitations |
| of the Memcache protocol. |
| </p> |
| </body> |
| </html> |