plugin/memory: add cache

Closes: https://github.com/pommi/CGP/issues/71