https://github.com/thinkjs/think-gc
gc manager for ThinkJS 3.x
https://github.com/thinkjs/think-gc
gc thinkjs3
Last synced: 3 months ago
JSON representation
gc manager for ThinkJS 3.x
- Host: GitHub
- URL: https://github.com/thinkjs/think-gc
- Owner: thinkjs
- License: mit
- Created: 2017-03-18T23:16:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T23:32:39.000Z (almost 5 years ago)
- Last Synced: 2025-08-28T09:39:30.242Z (9 months ago)
- Topics: gc, thinkjs3
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-gc
[](https://travis-ci.org/thinkjs/think-gc)
[](https://coveralls.io/github/thinkjs/think-gc?branch=master)
[](https://www.npmjs.com/package/think-gc)
gc manager for ThinkJS 3.x
## Install
```
npm install think-gc
```
## How to use
```js
const gc = require('think-gc');
class handle {
constructor(){
this.gcType = 'session';
gc(this, 3600 * 1000); //gc interval by 1 hour
}
gc(){
//do gc task
}
}
```