Skip to content

Sqlite3 and LevelDB persistent cache plugins + usage from DataSource#197

Open
confluence wants to merge 44 commits intoAstroua:developfrom
confluence:new-cache
Open

Sqlite3 and LevelDB persistent cache plugins + usage from DataSource#197
confluence wants to merge 44 commits intoAstroua:developfrom
confluence:new-cache

Conversation

@confluence
Copy link
Contributor

This pull request includes Sqlite3 and LevelDB implementations of the persistent cache API, as two separate plugins (cherry-picked and adapted from @pfederl's code).

It also adds calls to this API from the quantile-finding functions used in DataSource.

Each plugin needs a parent directory for the database file to be specified in the configuration file (~/.cartavis/config.json). One of the plugins can also be explicitly disabled in the configuration so that the other plugin is used. E.g.:

{
"disabledPlugins" : [
"PCacheSqlite3"
],

"plugins": {
    "PCacheSqlite3" : {
        "dbDir": "/tmp"
    },
    "PCacheLevelDB" : { 
        "dbDir": "/tmp"
    }
}

}

pfederl and others added 30 commits November 10, 2016 10:51
…rectory, not just the parent directory, to make it easier to specify a different location for a test database.
@confluence
Copy link
Contributor Author

I have changed the format of the config -- now the full path to the database file / directory is specified, not the parent directory. This makes it easier to override the location of the database from the unit tests. This is the new format:

"PCacheSqlite3" : {
    "dbPath": "/tmp/pcache.sqlite"
},
"PCacheLevelDB" : { 
    "dbPath": "/tmp/pcache.leveldb"
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants