candyblue/kirby3-garbage-collector

Clean up expired sessions with a cronjob.

Fund package maintenance!
lukas-becker.eu

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:kirby-plugin

v1.0.0 2020-11-14 18:23 UTC

This package is auto-updated.

Last update: 2024-05-15 02:13:30 UTC


README

This plugin provides a script, which cleans up expired sessions. You can run it periodically with a cronjob.

Installation

composer require candyblue/kirby3-garbage-collector

Usage

  1. You need to disable the automatic garbage collector in your Kirby config:
<?php
return [
    'session' => [
        'gcInterval' => false
    ]
];
  1. You can define a custom pattern for the garbage collector script in your Kirby config.
<?php
return [
    'candyblue.kirby3-garbage-collector' => [
        pattern => 'your-custom-pattern'
    ]
];

The default pattern is: 82525kfqeqdtskpn. 3. You need to create a cronjob, which triggers your pattern.