Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StockQuoteController : SitecoreController {
- private IStockQuoteAgent _stockQuoteAgent;
- public StockQuoteController(IStockQuoteAgent stockQuoteAgent) {
- _stockQuoteAgent = stockQuoteAgent;
- }
- [OutputCache(CacheProfile = "StockQuoteCacheProfile")]
- [HttpPost]
- public JsonResult GetStockPrice() {
- ...
- }
- }
- <caching>
- <outputCache enableOutputCache="true" enableFragmentCache="true" sendCacheControlHeader="true" omitVaryStar="false"></outputCache>
- <outputCacheSettings>
- <outputCacheProfiles>
- <add name="StockQuoteCacheProfile" duration="1800" varyByParam="none" location="ServerAndClient" />
- </outputCacheProfiles>
- </outputCacheSettings>
- </caching>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement