first commit
This commit is contained in:
14
grafana/dashboards/requests/node_modules/http-basic/lib/cache-control-utils.d.ts
generated
vendored
Normal file
14
grafana/dashboards/requests/node_modules/http-basic/lib/cache-control-utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { CachedResponse } from './CachedResponse';
|
||||
import Response = require('http-response-object');
|
||||
export declare type Policy = {
|
||||
maxage: number | null;
|
||||
};
|
||||
/**
|
||||
* returns true if this response is cacheable (according to cache-control headers)
|
||||
*/
|
||||
export declare function isCacheable<T>(res: Response<T> | CachedResponse): boolean;
|
||||
/**
|
||||
* if the response is cacheable, returns an object detailing the maxage of the cache
|
||||
* otherwise returns null
|
||||
*/
|
||||
export declare function cachePolicy<T>(res: Response<T> | CachedResponse): Policy | null;
|
||||
Reference in New Issue
Block a user