
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@superherocheesecake/cache-validator
Advanced tools
Validates cache settings against Superhero Cheesecake standards
This CLI util will validate CDN/cache settings on a website, by default using the standard Superhero Cheesecake caching strategy patterns for CloudFront.
The tool will load the user specified url, render the webpage, and execute javascript. Then individual requests will be checked against the cache settings as specified in the config.
npm i @superherocheesecake/cache-validator -g
validate-cache --url https://superherocheesecake.com
default is https://superherocheesecake.com
--url=url
It is possible to specify a custom cache pattern config to allow custom cache settings and CDN provider to be validated. This parameter requires a path to a config JSON file.
--cachePatterns=cachePatternsConfigJSON
The default cache pattern config file for the validator looks like this:
{
"patterns": [
{
"name" : "Main document",
"path" : "/",
"requiredHeaders": ["cache-control", "x-cache"],
"requiredValues" : {
"cache-control": {
"maxAge": "1800"
},
"x-cache" : "Hit from cloudfront"
}
},
{
"name" : "API's",
"path" : "/api",
"requiredHeaders": ["cache-control"],
"requiredValues" : {
}
},
{
"name" : "Static assets",
"path" : "/static",
"requiredHeaders": ["cache-control", "x-cache"],
"requiredValues" : {
"cache-control": {
"maxAge": "31536000"
},
"x-cache" : "Hit from cloudfront"
}
},
{
"name" : "Content",
"path" : "/content",
"requiredHeaders": ["cache-control", "x-cache"],
"requiredValues" : {
"cache-control": {
"maxAge": "3600"
},
"x-cache" : "Hit from cloudfront"
}
}
]
}
FAQs
Validates cache settings against Superhero Cheesecake standards
We found that @superherocheesecake/cache-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 open source maintainers 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.

Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.

Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.