OpenSCAD User Manual/WIP/Persistent Cache
Introduction
editThe cache data of rendered geometries in OpenSCAD is limited to the life-span of the application. This feature provides a solution for the persistent storage of rendered geometries. All the rendered geometries are serialized using boost serialization library and pushed into local filesystem cache or into the Redis database according user preferences.
How to use redis for cache?
edit- Download and install Redis database
- Download Hiredis release version 0.14.1 or above from, build and install it.
- The source code of this feature is not merged yet. It is available in this PR https://github.com/openscad/openscad/pull/3316. Clone and build this PR.
- Start the Redis-server and make a note of IP address, port number, and password if any from it's config file.
- GUI MODE: Open the preferences dialog and move to the advance tab. enable the checkbox persistent cache using Redis. fill in the config details and close the preferences dialog.
- CLI MODE: a new option cache is added to OpenSCAD. The usage of this option in the case of Redis is shown below.
example: ""--cache=redis,127.0.0.1,6379,foobared""
- That's it, now OpenSCAD is ready to use Redis for caching.
How to use local cache?
edit- GUI MODE: Open the preferences dialog and move to the advance tab. enable the Local cache checkbox.
- CLI MODE: This is another variant in cache option. The usage of this option is shown below.
example: ""--cache=file""
- That's it, now OpenSCAD is ready to use local filesystem for caching.