Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Visibility Enum
Use the Cache.Visibility
enumeration in the Cache.Session or Cache.Org methods to indicate whether a cached value is
visible only in the value’s namespace or in all namespaces.
Enum Values
The following are the values of the Cache.Visibility enum.
| Value | Description |
|---|---|
| ALL | The cached value is available to Apex code executing from any namespace. This is the default state. |
| NAMESPACE |
The cached value is available to Apex code executing from the same namespace. If a key has the Visibility.NAMESPACE attribute, a get method initiated from a different namespace returns null. |