Improve cache support (allow different cache implementations)

the details of how cache support is implemented was moved from
indexing and search connection to the cache manager itself (see issue
#46)