Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
parse-cache-control
Advanced tools
Parse Cache-Control headers.
Weekly downloads
Package description
The parse-cache-control npm package is designed to parse the value of the HTTP 'Cache-Control' header. It returns an object representing the directives and their respective values, making it easier to interpret and utilize cache control settings within an application.
Parsing Cache-Control Header
This feature allows you to parse the 'Cache-Control' header string from an HTTP response and convert it into a JavaScript object. Each directive in the header is represented as a key in the resulting object, with its value being the directive's value or true if the directive has no value.
{"Cache-Control": "public, max-age=3600"}
This package is similar to parse-cache-control in that it also deals with HTTP caching semantics. However, it provides a more comprehensive set of features for interpreting cache headers, deciding cacheability, and calculating freshness lifetime of responses.
The cache-control package is another alternative that provides parsing and formatting utilities for HTTP Cache-Control headers. It differs from parse-cache-control by offering functionality to both parse existing headers and create new ones.
Readme
Simple function to parse Cache-Control
headers. Taken from Wreck.
See test.js
for usage.
FAQs
Parse Cache-Control headers.
The npm package parse-cache-control receives a total of 1,287,545 weekly downloads. As such, parse-cache-control popularity was classified as popular.
We found that parse-cache-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.