Storage

Set Storage Cache

Write an entry to the Cache Storage API.

Write an entry to the Cache Storage API.

Writes or updates a value in the browser's Cache Storage (the Cache API), scoped by cache name (storeName) and request key.

Examples

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.SetStorage(WebsiteStorageType.cache, data, domain: null, path: null, key: "/api/data", storeName: "my-cache");

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.SetStorageCache).WithStorageType(WebsiteStorageType.cache).WithStorageKey("/api/data").WithStorageStoreName("my-cache").WithValue(data).Execute();