1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00
2020-07-18 22:53:28 +08:00

32 lines
479 B
PHP

<?php
namespace App\Caches;
use App\Repos\ImGroup as ImGroupRepo;
class ImGroup extends Cache
{
protected $lifetime = 365 * 86400;
public function getLifetime()
{
return $this->lifetime;
}
public function getKey($id = null)
{
return "im_group:{$id}";
}
public function getContent($id = null)
{
$groupRepo = new ImGroupRepo();
$group = $groupRepo->findById($id);
return $group ?: null;
}
}