2017 © Pedro Peláez
 

library staticize

Put php outputbuffer into cache

image

staticize/staticize

Put php outputbuffer into cache

  • Tuesday, June 12, 2018
  • by nathanwu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Staticize

This is library can put php output buffer content into cache like redis, memcache, filesystem, and so on., (*1)

install

composer require staticize/staticize

Have Question or Feedback?

if you have any question or feedback, contact me Q:26441530 or cunheise [at] 163.com, (*2)

sample

bootstrap.php file

require dirname(__DIR__) . '/vendor/autoload.php';

use Pimple\Container;
use Staticize\Page;
use Symfony\Component\Cache\Simple\FilesystemCache;

$container = new Container();
$container['namespace'] = 'namespace';
$container['lifetime'] = 1;
$container['directory'] = dirname(__DIR__) . '/runtime';
$container['cache'] = function ($c) {
    return new FilesystemCache($c['namespace'], $c['lifetime'], $c['directory']);
};
$container['page'] = function ($c) {
    return new Page($c['pagename'], $c['cache']);
};

start_end.php sample file

require __DIR__ . '/bootstrap.php';
$container['pagename'] = 'start_end.html';
if (!$container['page']->isValid()) {
    $container['page']->start();
    echo 'start end page';
    $container['page']->end();
}
echo $container['page'];

enclose.php sample file

require __DIR__ . '/bootstrap.php';
$container['pagename'] = 'enclose.html';
if (!$container['page']->isValid()) {
    $container['page']->enclose(function () {
        echo 'enclose page test';
    });
}
echo $container['page'];

License

Copyright 2008-2018., (*3)

Licensed under the GNU Lesser General Public License, Version 3.0, (*4)

The Versions

12/06 2018

dev-master

9999999-dev https://github.com/cunheise/staticize.git

Put php outputbuffer into cache

  Sources   Download

MIT

The Requires

 

The Development Requires

static outputbuffer page cache

06/06 2018

0.1.3

0.1.3.0 https://github.com/cunheise/staticize.git

Put php outputbuffer into cache

  Sources   Download

MIT

The Requires

 

The Development Requires

static outputbuffer page cache

05/06 2018

0.1.2

0.1.2.0 https://github.com/cunheise/staticize.git

Put php outputbuffer into cache

  Sources   Download

MIT

The Requires

 

The Development Requires

static outputbuffer page cache

04/06 2018

0.1.1

0.1.1.0 https://github.com/cunheise/staticize.git

Put php outputbuffer into cache

  Sources   Download

MIT

The Requires

 

The Development Requires

static outputbuffer page cache

04/06 2018

0.1.0

0.1.0.0 https://github.com/cunheise/staticize.git

Put php outputbuffer into cache

  Sources   Download

MIT

The Requires

 

The Development Requires

static outputbuffer page cache