0

This question is directed towards Jeroen and is a follow-up to this answer: https://stackoverflow.com/a/12482918/177984

Jeroen wrote "the server does caching" .. "so if enough memory is available it will automatically be available from memory."

How can I confirm if an object is cached 'in-memory' or not? From what I can tell (by performance) all of my objects are being read from disk. I'd like to have things read from memory to speed up data load times. Is there a way to view what's in the in-memory cache? Is there a way to force caching objects in-memory?

Thanks for your help.

Community
  • 1
  • 1

1 Answers1

0

The OpenCPU project is rapidly evolving. Things have changed in OpenCPU 1.0. Have a look at the website for the latest information: http://www.opencpu.org.

The answer that you cited is outdated. Currently indeed all the caching is done on disk. In a previous version, OpenCPU used Varnish to do caching, which is completely in-memory. However this turned out to make things more complicated (especially https), and performance was a bit disappointing (especially in comparison with fast disks these days). So now we're back at nginx which caches on disk, but is much more mature and configurable as a web server, and has other performance benefits.

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
  • Thanks for your reply. Looking forward to the re-implmentation! What is the timing of that? Follow-up question: what is the lifecycle of objects stored in /R/tmp? The 'tmp' part implies it is temporary and therefore limited. But is there anything cleaning up these objects? Can I rely on them being there forever? – Callister Park Aug 01 '13 at 00:05
  • It's almost ready, need to start documenting. https://github.com/jeroenooms/opencpu for the single-user server and https://github.com/jeroenooms/opencpu-deb#README for the cloud server. – Jeroen Ooms Aug 01 '13 at 07:32