Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mmap based JDBC cache #21

Open
emmanuel-keller opened this issue Oct 20, 2017 · 0 comments
Open

Add support for Mmap based JDBC cache #21

emmanuel-keller opened this issue Oct 20, 2017 · 0 comments
Milestone

Comments

@emmanuel-keller
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant