Change cache and session config to use array instead of file.

Resolves issue #58