2017 © Pedro Peláez
 

library swoft-aop-cacheable

Swoft 基于Aop缓存扩展

image

limingxinleo/swoft-aop-cacheable

Swoft 基于Aop缓存扩展

  • Tuesday, July 24, 2018
  • by limingxinleo
  • Repository
  • 1 Watchers
  • 2 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

swoft-aop-cacheable

Swoft 基于Aop缓存, (*1)

Build Status, (*2)

使用

config/properties/app.php中增加对应的组件, (*3)

'components' => [
    'custom' => [
        'Swoftx\\Aop\\Cacheable\\',
    ],
]

增加需要进入缓存切面的类, (*4)

<?php

namespace SwoftTest\Testing\Bean;

use Swoft\Bean\Annotation\Bean;
use Swoftx\Aop\Cacheable\Annotation\Cacheable;

/**
 * Class Demo
 * @Bean
 * @package SwoftTest\Testing\Bean
 */
class Demo
{
    /**
     *
     * @author limx
     * @Cacheable(key="output:{0}:{1}:{2}", ttl=36000)
     * @param $name
     * @return mixed
     */
    public function output($name, $sex = 1, $msg = 'hello world')
    {
        return $name;
    }
}

调用, (*5)

<?php
use SwoftTest\Testing\Bean\Demo;

$bean = bean(Demo::class);
$res = $bean->output('limx');

The Versions

24/07 2018

dev-master

9999999-dev

Swoft 基于Aop缓存扩展

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

php model db swoole swoft

24/07 2018

1.0.1

1.0.1.0

Swoft 基于Aop缓存扩展

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

php model db swoole swoft