magibney commented on PR #1351:
URL: https://github.com/apache/solr/pull/1351#issuecomment-1428666164
> May be we need a bit more clarity on how to use this cache can be used by
a core
Yes, sorry. Ideally this would be built out with more test cases, but for
now I went light on tests for the proof-of-concept/reference-implementation
`ThinCache`, as it was intended at this point mainly to illustrate the value of
the "node-level cache" approach.
You'd configure the node-level backing cache in `solr.xml`:
```xml
<solr>
<caches>
<cache name="myNodeLevelCache"
class="solr.ThinCache$NodeLevelCache"
maxRamMB="1024"
/>
</caches>
</solr>
```
... and the missing piece is that you'd configure the `ThinCache` in the
same way you would any core-level cache (in `solrconfig.xml`), providing the
name of the node-level backing cache as a config attribute:
```xml
<filterCache class="solr.ThinCache"
nodeLevelCacheName="myNodeLevelCache"
autowarmCount="10"
/>
```
`NodeLevelCache` extends `solr.CaffeineCache`, and can take any config param
that CaffeineCache takes (wrt eviction policies, etc., though due to having a
different lifecycle than a core-based cache, "autowarm" is not directly
applicable at the node level).
`ThinCache` has basically two params: `nodeLevelCacheName`, and
`autowarmCount`, because autowarm is the one cache attribute that's still
evaluated at the per-core level.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]