Working Around Cache

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
один год назад
I can see most services are using cache to bring in result faster but my question is this:

Suppose we have category pages and each category page has the same URL but the data brought changes based on the Session Variable . So how can I use the cache here do I have to make a different page/Url for each possible iteration of the Session Variable for the cache to work accordingly.
один год назад
The cache lookup works based on the 'key'.  You can modify the key using your session variable.
How / where you do that may depend on your needs.  Here is example of Sendinblue plugin setting up key / lookup.

... await _staticCacheManager.GetAsync(_staticCacheManager.PrepareKeyForDefaultCache(SendinblueDefaults.SyncKeyCache), () => string.Empty);


You can find similar staticCacheManager.GetAsync(...) for your needs.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.