l a s
l a s

Reputation: 3923

Infinispan file store with pre-loaded data

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?

Upvotes: 0

Views: 189

Answers (1)

Radim Vansa
Radim Vansa

Reputation: 5888

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).

Upvotes: 2

Related Questions