Fixing swig cache

If `options.cache === true`, swig expects the value returned to be `'memory'`, otherwise an error is thrown.