承接 atk14/session-storer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

atk14/session-storer

最新稳定版本:v1.2.2

Composer 安装命令:

composer require atk14/session-storer

包简介

A library for storing sessions in database used in the ATK14 Framework

README 文档

README

A library for storing sessions in a database, used in the ATK14 Framework.

Installation

composer require atk14/session-storer

Basic usage

$session = new SessionStorer();

$session->writeValue("user_id", 42);
$user_id = $session->readValue("user_id"); // 42

Sessions cleanup (cron job)

Old sessions can be cleaned up by calling the static method DeleteOldSessions(). It is suitable for use in a cron job (e.g. sessions_cleanup running once a day):

$deleted = SessionStorer::DeleteOldSessions([
    "session_name" => "session",
    "max_lifetime" => 60 * 60 * 24, // 1 day
]);

Available options:

Option Default Description
dbmole auto dbmole instance; auto-detected from globals or singleton if not provided
current_time time() Unix timestamp to use as "now"
session_name null if set together with max_lifetime, deletes expired sessions by name
max_lifetime null session lifetime in seconds
deep_clean true if true, also deletes all sessions older than 2 years

The method returns the total count of deleted records.

License

MIT

统计信息

  • 总下载量: 231
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固