Title: Can I access the cache across different script? · Issue #312 · node-cache/node-cache · GitHub
Open Graph Title: Can I access the cache across different script? · Issue #312 · node-cache/node-cache
X Title: Can I access the cache across different script? · Issue #312 · node-cache/node-cache
Description: Let's say I am declaring an obj in test1.js. const NodeCache = require( "node-cache" ); const myCache = new NodeCache( { stdTTL: 100, checkperiod: 120 } ); obj = { my: "Special", variable: 42 }; success = myCache.set( "myKey", obj, 10000...
Open Graph Description: Let's say I am declaring an obj in test1.js. const NodeCache = require( "node-cache" ); const myCache = new NodeCache( { stdTTL: 100, checkperiod: 120 } ); obj = { my: "Special", variable: 42 }; su...
X Description: Let's say I am declaring an obj in test1.js. const NodeCache = require( "node-cache" ); const myCache = new NodeCache( { stdTTL: 100, checkperiod: 120 } ); obj = { my: "Special&q...
Opengraph URL: https://github.com/node-cache/node-cache/issues/312
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can I access the cache across different script?","articleBody":"Let's say I am declaring an `obj` in test1.js.\r\n```javascript\r\nconst NodeCache = require( \"node-cache\" );\r\nconst myCache = new NodeCache( { stdTTL: 100, checkperiod: 120 } );\r\n\r\nobj = { my: \"Special\", variable: 42 };\r\n \r\nsuccess = myCache.set( \"myKey\", obj, 10000 );\r\n```\r\nIs it possible to access `\"myKey\"` in test2.js during running? \r\n\r\nIf yes, how can I do it? \r\n\r\nIf not, how to access `\"myKey\"` in some child nested functions? Through multiple passing as the parameter?","author":{"url":"https://github.com/tungrix","@type":"Person","name":"tungrix"},"datePublished":"2023-08-07T02:53:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/312/node-cache/issues/312"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ac7b483-2533-c7d6-4fcf-46563e545852 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 943E:300F19:AC2645C:DF264D5:6976F9BE |
| html-safe-nonce | 0ed63aac85610ee0413c8ce6f143bc74510a430b083adcde76eb2faadc5e7c71 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDNFOjMwMEYxOTpBQzI2NDVDOkRGMjY0RDU6Njk3NkY5QkUiLCJ2aXNpdG9yX2lkIjoiMTk2NTQ2MTE5MDc1Mjk3NzI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bacda20fa1e7f65ed341aea7d05c726bd2a654dfc8312120ab610f350dc1a18f |
| hovercard-subject-tag | issue:1838583116 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/node-cache/node-cache/312/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e8bb3d07596422b24932aaf1be9ca9ddf4f596dbe4cc23294c8b5bae06c78b1a/node-cache/node-cache/issues/312 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e8bb3d07596422b24932aaf1be9ca9ddf4f596dbe4cc23294c8b5bae06c78b1a/node-cache/node-cache/issues/312 |
| og:image:alt | Let's say I am declaring an obj in test1.js. const NodeCache = require( "node-cache" ); const myCache = new NodeCache( { stdTTL: 100, checkperiod: 120 } ); obj = { my: "Special", variable: 42 }; su... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tungrix |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09 |
| turbo-cache-control | no-preview |
| go-import | github.com/node-cache/node-cache git https://github.com/node-cache/node-cache.git |
| octolytics-dimension-user_id | 54621913 |
| octolytics-dimension-user_login | node-cache |
| octolytics-dimension-repository_id | 2599450 |
| octolytics-dimension-repository_nwo | node-cache/node-cache |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2599450 |
| octolytics-dimension-repository_network_root_nwo | node-cache/node-cache |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f752335dbbea672610081196a1998e39aec5e14b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width