Expression caching on/off flag (default is off).

Because cached expressions can take up a lot of memory if they contain
large matrices, expression caching is now optional.