1. Go to this page and download the library: Download winter/wn-octane-plugin library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
winter / wn-octane-plugin example snippets
'warm_up_paths' => ['/'],
public function resetWorkerState(): void
{
$this->somePerRequestCache = [];
}
public function keepWorkerCacheValue(string $key, $value): bool
{
return str_starts_with($key, 'acme.site.');
}
use Winter\Octane\Attributes\WorkerScoped;
#[WorkerScoped('Parsed from the YAML files in the plugin.')]
protected static ?array $fieldConfigs = null;