问题
I am using infinispan as cache provider. I have a flat file containing key (long) value (string) pairs. Upon application load time, i want an embedded infinispan cache to start with flat file as the storage so that the contents of the flat file is the system of record and the contents of the file is cached by infinispan. As new records get added to cache, i want the flat file to be appended. Is it possible with infinispan?
回答1:
Principially yes, you have to implement you own cache loader/store that will read and modify that file. Checkout SingleFileStore for a simple implementation of the SPI (SingleFileStore is general-purpose file-based store).
来源:https://stackoverflow.com/questions/39628895/infinispan-file-store-with-pre-loaded-data