I am trying to use jboss cache 3.0.1 for an application where I would like to have it load all of the data from the JDBC loader into memory at startup and then not query the database if a cache miss occurs. (That is, the cache should know that all of the available data is in memory). I do want it to persist any new data added to the cache back to the database.
In my current config, the cache is querying the JDBC Loader each time a requested node is not found in memory. Most of the requested nodes will not be found and all of the data should be stored in memory, so the database queries are slow and unnecessary.
Can anyone advise me on how to configure the cache so it does not query the JDBC Loader in the event that a requested node is not found in memory? That is, how to make it a memory resident cache that loads it data at startup from a database?
That's a pretty specialized case. You could write your own cache loader which extends the JDBCCacheLoader, and does nothing for the get() operations.
As for loading data on startup, you could use the preload configuration element for this.