Skip to content

This module allows you to build static HTML caches of every page (for increased security and performance)

License

Notifications You must be signed in to change notification settings

dnadesign/silverstripe-staticpublishqueue

 
 

Repository files navigation

Static Publisher with Queue

CI Silverstripe supported module

Installation

composer require silverstripe/staticpublishqueue

Brief

This module provides an API for your project to be able to generate a static cache of your pages to enhance performance by not booting Silverstripe in order to serve requests.

It generates the cache files using the QueuedJobs module.

Docs

Unit-testing with StaticPublisherState to disable queuedjobs for unit-tests

You can use StaticPublisherState to disable queuejobs job queueing and logging in unit-testing to improve performance.

Add the following yml to your project:

----
Name: staticpublishqueue-tests
Only:
  classexists:
    - 'Symbiote\QueuedJobs\Tests\QueuedJobsTest\QueuedJobsTest_Handler'
    - 'SilverStripe\StaticPublishQueue\Test\QueuedJobsTestService'
----
SilverStripe\Core\Injector\Injector:
  SilverStripe\Dev\State\SapphireTestState:
    properties:
      States:
        staticPublisherState: '%$SilverStripe\StaticPublishQueue\Dev\StaticPublisherState'

About

This module allows you to build static HTML caches of every page (for increased security and performance)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.6%
  • Scheme 0.4%