# GitHub - getkirby/staticache: Static site performance on demand

**URL:** <https://forum.getkirby.com/t/github-getkirby-staticache-static-site-performance-on-demand/26863>\
**Category:** Questions\
**Created:** [October 28, 2022, 4:45am UTC](https://forum.getkirby.com/t/github-getkirby-staticache-static-site-performance-on-demand/26863 "2022-10-28T04:45:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert9](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@robert9](https://forum.getkirby.com/u/robert9)\
**Post date:** [October 28, 2022, 4:45am UTC](https://forum.getkirby.com/t/github-getkirby-staticache-static-site-performance-on-demand/26863/1 "2022-10-28T04:45:42Z")

</div>

> **[GitHub - getkirby/staticache: Static site performance on demand](https://github.com/getkirby/staticache)**
>
> Static site performance on demand

Have uploaded the dir to plugins

Have insert code in config.

Have insert data in htaccess - funny, where should be:  
_Add the following lines to your Kirby htaccess file, directly after the RewriteBase rule._

I have more than one RewriteBase rule there. I add it after:

```auto
RewriteRule ^kirby/(.*) index.php [L]

RewriteCond %{DOCUMENT_ROOT}/static/%{REQUEST_URI}/index.html -f [NC]
RewriteRule ^(.*) %{DOCUMENT_ROOT}/static/%{REQUEST_URI}/index.html [L]

```

Now i get:

```auto
 Whoops \ Exception \ ErrorException (E_COMPILE_ERROR)
Declaration of Kirby\Cache\StatiCache::retrieve(string $key) must be compatible with Kirby\Cache\FileCache::retrieve(string $key): ?Kirby\Cache\Value

```

---

<div class="post-metadata">

**Author:** ![robert9](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@robert9](https://forum.getkirby.com/u/robert9)\
**Post date:** [October 28, 2022, 4:57am UTC](https://forum.getkirby.com/t/github-getkirby-staticache-static-site-performance-on-demand/26863/2 "2022-10-28T04:57:55Z")

</div>

> <https://github.com/getkirby/staticache/issues/12>
>
> From discord @gillesvauvarin
> 
> \> Declaration of Kirby\\Cache\\StatiCache::retriev…e(string $key) must be compatible with Kirby\\Cache\\FileCache::retrieve(string $key): ?Kirby\\Cache\\Value
