Implements a new type of cache using Mmap files with the URL:
jdbc:cache:mmap:{path-to-the-cache-directory} for on disk cache
Thanks to Mmap, this type of cache will provide file system persistence as well as in memory performances.
// Initialize the cache driver
Class.forName("com.qwazr.jdbc.cache.Driver");
// Provide the URL and the Class name of the backend driver
Properties info = new Properties();
info.setProperty("cache.driver.url", "jdbc:derby:mmap:myDB;create=true");
info.setProperty("cache.driver.class", "org.apache.derby.jdbc.EmbeddedDriver");
// Get your JDBC connection
Connection cnx = DriverManager.getConnection("jdbc:cache:mmap:my-mmap-cache", info);
Implements a new type of cache using Mmap files with the URL: jdbc:cache:mmap:{path-to-the-cache-directory} for on disk cache
Thanks to Mmap, this type of cache will provide file system persistence as well as in memory performances.
// Initialize the cache driver Class.forName("com.qwazr.jdbc.cache.Driver");
// Provide the URL and the Class name of the backend driver Properties info = new Properties(); info.setProperty("cache.driver.url", "jdbc:derby:mmap:myDB;create=true"); info.setProperty("cache.driver.class", "org.apache.derby.jdbc.EmbeddedDriver"); // Get your JDBC connection Connection cnx = DriverManager.getConnection("jdbc:cache:mmap:my-mmap-cache", info);