bnomei/kirby3-page-sqlite

This package is abandoned and no longer maintained. No replacement package was suggested.

Kirby 3 Plugin to cache the content file using SQLite

1.2.2 2020-09-06 01:33 UTC

This package is auto-updated.

Last update: 2021-10-11 11:57:02 UTC


README

 

ARCHIVED

use Kirby3 Boost instead

 

Kirby 3 Page SQLite

Release Downloads Build Status Coverage Status Maintainability Twitter

Kirby 3 Plugin to cache the content file using SQLite

Commercial Usage

This plugin is free (MIT license) but if you use it in a commercial project please consider to

Installation

  • unzip master.zip as folder site/plugins/kirby3-page-sqlite or
  • git submodule add https://github.com/bnomei/kirby3-page-sqlite.git site/plugins/kirby3-page-sqlite or
  • composer require bnomei/kirby3-page-sqlite

Usage

To use this plugin create Page-Models and extend the \Bnomei\SQLitePage class. This will read and write a copy of your Content-File to and from a SQLite database. The plugin will automatically keep track of the modified timestamp.

site/models/example.php

<?php

class ExamplePage extends \Bnomei\SQLitePage
{
    // that's it. all done. 👍
}

TIP: If you set Kirbys global debug option to true all cached Content-Files will be flushed.

site/templates/example.php

<?php
/** @var ExamplePage $page */
$checkIfContentFileIsSQLiteCached = $page->isSQLitePage(); // bool

Settings

bnomei.page-sqlite. Default Description
file callback

Dependencies

  • PHP SQLite extension

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.