Fix shared cache so that reserve size is always initialized properly.

Also change how we detect if shared cache is used. It used to rely on
a name, now it will be used if the shared_cache configuration option
was included by the user.