René's URL Explorer Experiment


Title: Recursive call: RangeError: Maximum call stack size exceeded when deleteOnExpire:false · Issue #313 · node-cache/node-cache · GitHub

Open Graph Title: Recursive call: RangeError: Maximum call stack size exceeded when deleteOnExpire:false · Issue #313 · node-cache/node-cache

X Title: Recursive call: RangeError: Maximum call stack size exceeded when deleteOnExpire:false · Issue #313 · node-cache/node-cache

Description: Hi This is a specific case when deleteOnExpire:false and try to use has/get function in .on("expired", (key,value) => callback) Here is a small sample code to test the behaviour import NodeCache from 'node-cache'; const myCache = new Nod...

Open Graph Description: Hi This is a specific case when deleteOnExpire:false and try to use has/get function in .on("expired", (key,value) => callback) Here is a small sample code to test the behaviour import NodeCache fr...

X Description: Hi This is a specific case when deleteOnExpire:false and try to use has/get function in .on("expired", (key,value) => callback) Here is a small sample code to test the behaviour import...

Opengraph URL: https://github.com/node-cache/node-cache/issues/313

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recursive call: RangeError: Maximum call stack size exceeded when deleteOnExpire:false","articleBody":"Hi\r\n\r\nThis is a specific case when deleteOnExpire:false and try to use has/get function in  .on(\"expired\", (key,value) =\u003e callback)\r\n\r\nHere is a small sample code to test the behaviour\r\n\r\n```\r\nimport NodeCache from 'node-cache';\r\n\r\nconst myCache = new NodeCache({checkperiod:10,deleteOnExpire:false});\r\nmyCache.on( \"set\", ( key, value ) =\u003e console.log(\"On SET \"+ key + '=' + value));\r\nmyCache.on( \"del\", ( key, value ) =\u003e console.log(\"On DEL: \"+ key + '=' + value));\r\nmyCache.on( \"expired\", ( key, value ) =\u003e {\r\n        console.log(\"On EXPIRED \"+ key + '=' + value);\r\n        //myCache.set(key, value+'_',10); // \u003c-- Uncommenting will work, commenting this line will crash process due to either of below lines causing recursion \r\n        let test1 = myCache.has(key); //\u003c--\r\n        let test2 =myCache.get(key); // \u003c-- \r\n});\r\n\r\nmyCache.set(\"MyKey\",\"MyValue\",5);\r\n\r\n//Below code is dummy/sample long running code.... \r\nlet done =1;\r\n(function wait () {\r\n   if (done) setTimeout(wait, 1000);\r\n})();\r\n\r\n```\r\n\r\n─$ node test.mjs\r\nOn EXPIRED MyKey=MyValue\r\nOn EXPIRED MyKey=MyValue\r\nOn EXPIRED MyKey=MyValue\r\n.... \r\nOn EXPIRED MyKey=MyValue\r\nnode:internal/console/constructor:309\r\n        if (isStackOverflowError(e))\r\n            ^\r\n\r\nRangeError: Maximum call stack size exceeded\r\n    at console.value (node:internal/console/constructor:309:13)\r\n    at console.log (node:internal/console/constructor:380:26)\r\n    at NodeCache.\u003canonymous\u003e (file:///Users/raxitsmacbook/MyNodeRnd/test.mjs:7:10)\r\n    at NodeCache.emit (node:events:514:28)\r\n    at NodeCache._check (/Users/raxitsmacbook/MyNodeRnd/node_modules/node-cache/lib/node_cache.js:659:16)\r\n    at NodeCache.has (/Users/raxitsmacbook/MyNodeRnd/node_modules/node-cache/lib/node_cache.js:575:52)\r\n    at NodeCache.\u003canonymous\u003e (file:///Users/raxitsmacbook/MyNodeRnd/test.mjs:9:22)\r\n    at NodeCache.emit (node:events:514:28)\r\n    at NodeCache._check (/Users/raxitsmacbook/MyNodeRnd/node_modules/node-cache/lib/node_cache.js:659:16)\r\n    at NodeCache.has (/Users/raxitsmacbook/MyNodeRnd/node_modules/node-cache/lib/node_cache.js:575:52)\r\n\r\nNode.js v18.17.1 (However it looks like this behaviour is independent of Node version, Just in case if version can be of any help.)\r\n\r\nPossible bug also in: mget when  deleteOnExpire:false\r\n\r\nAlso when deleteOnExpire:false it constantly emits \"expired\" event on every 'checkperiod' times. (But it does not crash, But nice to have non-periodic expire event unless the object/key/value/expiry etc has been modified.","author":{"url":"https://github.com/raxitsheth","@type":"Person","name":"raxitsheth"},"datePublished":"2023-09-06T18:50:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/313/node-cache/issues/313"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:48d9ce81-649f-2752-cfa3-e1ba54e74c99
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E2E:DF47A:EC70C0E:1340BCDA:69772E89
html-safe-nonce0ef76dc7e74697d5b545217c13ffe0a3737c1ed5947d8fac270f7496f25dc3d9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTJFOkRGNDdBOkVDNzBDMEU6MTM0MEJDREE6Njk3NzJFODkiLCJ2aXNpdG9yX2lkIjoiMjk3NjM0MjU3OTAzODU5Njc0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6fd2006e36bcc96a01c6af8cdb254d184f9ea7db89d5f6ed532ee2781ddb5cd6
hovercard-subject-tagissue:1884571265
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/node-cache/node-cache/313/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2ec034a3b8928d7eba29079b186ac68b7a5d383f7d26fae9abe381b94f8581ea/node-cache/node-cache/issues/313
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2ec034a3b8928d7eba29079b186ac68b7a5d383f7d26fae9abe381b94f8581ea/node-cache/node-cache/issues/313
og:image:altHi This is a specific case when deleteOnExpire:false and try to use has/get function in .on("expired", (key,value) => callback) Here is a small sample code to test the behaviour import NodeCache fr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameraxitsheth
hostnamegithub.com
expected-hostnamegithub.com
None01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09
turbo-cache-controlno-preview
go-importgithub.com/node-cache/node-cache git https://github.com/node-cache/node-cache.git
octolytics-dimension-user_id54621913
octolytics-dimension-user_loginnode-cache
octolytics-dimension-repository_id2599450
octolytics-dimension-repository_nwonode-cache/node-cache
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2599450
octolytics-dimension-repository_network_root_nwonode-cache/node-cache
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef752335dbbea672610081196a1998e39aec5e14b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/node-cache/node-cache/issues/313#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnode-cache%2Fnode-cache%2Fissues%2F313
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnode-cache%2Fnode-cache%2Fissues%2F313
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=node-cache%2Fnode-cache
Reloadhttps://patch-diff.githubusercontent.com/node-cache/node-cache/issues/313
Reloadhttps://patch-diff.githubusercontent.com/node-cache/node-cache/issues/313
Reloadhttps://patch-diff.githubusercontent.com/node-cache/node-cache/issues/313
node-cache https://patch-diff.githubusercontent.com/node-cache
node-cachehttps://patch-diff.githubusercontent.com/node-cache/node-cache
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fnode-cache%2Fnode-cache
Fork 144 https://patch-diff.githubusercontent.com/login?return_to=%2Fnode-cache%2Fnode-cache
Star 2.4k https://patch-diff.githubusercontent.com/login?return_to=%2Fnode-cache%2Fnode-cache
Code https://patch-diff.githubusercontent.com/node-cache/node-cache
Issues 57 https://patch-diff.githubusercontent.com/node-cache/node-cache/issues
Pull requests 20 https://patch-diff.githubusercontent.com/node-cache/node-cache/pulls
Actions https://patch-diff.githubusercontent.com/node-cache/node-cache/actions
Projects 0 https://patch-diff.githubusercontent.com/node-cache/node-cache/projects
Security 0 https://patch-diff.githubusercontent.com/node-cache/node-cache/security
Insights https://patch-diff.githubusercontent.com/node-cache/node-cache/pulse
Code https://patch-diff.githubusercontent.com/node-cache/node-cache
Issues https://patch-diff.githubusercontent.com/node-cache/node-cache/issues
Pull requests https://patch-diff.githubusercontent.com/node-cache/node-cache/pulls
Actions https://patch-diff.githubusercontent.com/node-cache/node-cache/actions
Projects https://patch-diff.githubusercontent.com/node-cache/node-cache/projects
Security https://patch-diff.githubusercontent.com/node-cache/node-cache/security
Insights https://patch-diff.githubusercontent.com/node-cache/node-cache/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/node-cache/node-cache/issues/313
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/node-cache/node-cache/issues/313
Recursive call: RangeError: Maximum call stack size exceeded when deleteOnExpire:falsehttps://patch-diff.githubusercontent.com/node-cache/node-cache/issues/313#top
https://github.com/raxitsheth
https://github.com/raxitsheth
raxitshethhttps://github.com/raxitsheth
on Sep 6, 2023https://github.com/node-cache/node-cache/issues/313#issue-1884571265
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.