1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 03:32:47 +08:00
koogua cbc2e5762a !11 阶段性合并
* 根据app需要作出相应调整
* 路由增加命名name,增加app应用管理
* 完成基本API,增加h5和小程序支付定义
2020-11-10 10:25:16 +08:00

32 lines
460 B
PHP

<?php
namespace App\Caches;
use App\Repos\App as AppRepo;
class App extends Cache
{
protected $lifetime = 365 * 86400;
public function getLifetime()
{
return $this->lifetime;
}
public function getKey($id = null)
{
return "app:{$id}";
}
public function getContent($id = null)
{
$appRepo = new AppRepo();
$result = $appRepo->findByAppKey($id);
return $result ?: null;
}
}