Add store middleware and cache