You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
487 B
18 lines
487 B
11 years ago
|
using System;
|
||
|
using Nancy;
|
||
|
|
||
|
namespace NzbDrone.Api.Frontend
|
||
|
{
|
||
|
public class IsCacheableSpecification
|
||
|
{
|
||
|
public bool IsCacheable(Request request)
|
||
|
{
|
||
|
if (request.Path.Contains(".")) return false;
|
||
|
if (request.Path.StartsWith("/api", StringComparison.CurrentCultureIgnoreCase)) return false;
|
||
|
if (request.Path.StartsWith("/signalr", StringComparison.CurrentCultureIgnoreCase)) return false;
|
||
|
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|