From 351cfef7a70ef311801be0bc9eb9e3891265d22b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 3 Feb 2014 23:04:19 -0500 Subject: use conditional caching on some json responses --- MediaBrowser.Controller/Net/IHttpResultFactory.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Net') diff --git a/MediaBrowser.Controller/Net/IHttpResultFactory.cs b/MediaBrowser.Controller/Net/IHttpResultFactory.cs index 0614db12e..b7dff96cd 100644 --- a/MediaBrowser.Controller/Net/IHttpResultFactory.cs +++ b/MediaBrowser.Controller/Net/IHttpResultFactory.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Net /// The factory function that creates the response object. /// The response headers. /// System.Object. - object GetOptimizedResultUsingCache(IRequest requestContext, Guid cacheKey, DateTime lastDateModified, TimeSpan? cacheDuration, Func factoryFn, IDictionary responseHeaders = null) + object GetOptimizedResultUsingCache(IRequest requestContext, Guid cacheKey, DateTime? lastDateModified, TimeSpan? cacheDuration, Func factoryFn, IDictionary responseHeaders = null) where T : class; /// @@ -65,7 +65,7 @@ namespace MediaBrowser.Controller.Net /// Type of the content. /// The response headers. /// System.Object. - object GetCachedResult(IRequest requestContext, Guid cacheKey, DateTime lastDateModified, TimeSpan? cacheDuration, Func factoryFn, string contentType, IDictionary responseHeaders = null) + object GetCachedResult(IRequest requestContext, Guid cacheKey, DateTime? lastDateModified, TimeSpan? cacheDuration, Func factoryFn, string contentType, IDictionary responseHeaders = null) where T : class; /// @@ -94,5 +94,15 @@ namespace MediaBrowser.Controller.Net /// if set to true [is head request]. /// System.Object. object GetStaticFileResult(IRequest requestContext, string path, FileShare fileShare = FileShare.Read, IDictionary responseHeaders = null, bool isHeadRequest = false); + + /// + /// Gets the optimized serialized result using cache. + /// + /// + /// The request. + /// The result. + /// System.Object. + object GetOptimizedSerializedResultUsingCache(IRequest request, T result) + where T : class; } } -- cgit v1.2.3