think-gc

gc for ThinkJS 3.x

Usage no npm install needed!

<script type="module">
  import thinkGc from 'https://cdn.skypack.dev/think-gc';
</script>

README

think-gc

Build Status Coverage Status npm

gc manager for ThinkJS 3.x

Install

npm install think-gc

How to use

const gc = require('think-gc');

class handle {
  constructor(){
    this.gcType = 'session';
    gc(this, 3600 * 1000); //gc interval by 1 hour
  }
  gc(){
    //do gc task
  }
}