Skip to content

Commit

Permalink
cre.initCache(): allow toggling crengine cache compression (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Feb 9, 2018
1 parent 953103e commit 4f05042
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ typedef struct CreDocument {
static int initCache(lua_State *L) {
const char *cache_path = luaL_checkstring(L, 1);
int cache_size = luaL_checkint(L, 2);
bool compress_cached_data = true;
if (lua_isboolean(L, 3)) {
compress_cached_data = lua_toboolean(L, 3);
}

// Setting this to false uses more disk space for cache,
// but speed up rendering and page turns quite a bit
compressCachedData(compress_cached_data);

ldomDocCache::init(lString16(cache_path), cache_size);

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/kpvcrlib/crengine

0 comments on commit 4f05042

Please sign in to comment.