Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-cache-ssr

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-cache-ssr - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/module.json

@@ -7,3 +7,3 @@ {

},
"version": "1.0.2"
"version": "1.0.3"
}
{
"name": "nuxt-cache-ssr",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",

@@ -29,3 +29,4 @@ "type": "module",

"dependencies": {
"cache-manager": "^5.1.1"
"cache-manager": "^5.1.1",
"ohash": "^0.1.5"
},

@@ -57,2 +58,2 @@ "devDependencies": {

"homepage": "https://github.com/bhaskarGyan/nuxt-cache-ssr#readme"
}
}

@@ -28,2 +28,17 @@ # nuxt-cache-ssr

],
key:(route:string,headers: any,device:Device)=>{
// Link to the function will be broken, so cannot use any imported modules or custom functions
//sample of using device to generate key
const {userAgent,...deviceType} = device
const key = [route];
Object.keys(deviceType).forEach(val => {
if(deviceType[val]){
key.push(val)
}
})
// returned value will be hashed using ohash
return key.join("-")
}
},

@@ -34,4 +49,25 @@

```
### Device Interface
```javascript
interface Device {
userAgent: string
isDesktop: boolean
isIos: boolean
isAndroid: boolean
isMobile: boolean
isMobileOrTablet: boolean
isDesktopOrTablet: boolean
isTablet: boolean
isWindows: boolean
isMacOS: boolean
isApple: boolean
isSafari: boolean
isFirefox: boolean
isEdge: boolean
isChrome: boolean
isSamsung: boolean
isCrawler: boolean
}
```
### TODO

@@ -41,3 +77,3 @@

- [ ] Regex for Pages
- [ ] Custom Key for Page Cache
- [x] Custom Key for Page Cache
- [ ] Redis Cache

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc