Creates a new workspace cache.
Service container instance to hook into document lifecycle events.
Optional
state: DocumentStateOptional document state on which the cache should evict.
If not provided, the cache will evict on DocumentBuilder#onUpdate
.
Deleted documents are considered in both cases.
Protected
throw
Every key/value pair in this cache is scoped to the whole workspace. If any document in the workspace is added, changed or deleted, the whole cache is evicted.