{"id":17767073,"url":"https://github.com/oliverfindl/wp-cache","last_synced_at":"2026-05-01T03:34:22.899Z","repository":{"id":111472109,"uuid":"170017354","full_name":"oliverfindl/wp-cache","owner":"oliverfindl","description":"[POC] Simple cache script for WordPress CMS based on Memcached. Script also includes simple quota mechanism.","archived":false,"fork":false,"pushed_at":"2019-04-13T10:12:32.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T13:04:54.587Z","etag":null,"topics":["cache","cms","memcached","php","php7","script","wordpress","wp-cache"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliverfindl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-10T19:29:04.000Z","updated_at":"2022-02-12T08:25:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"4341a3d3-a0a2-4cd0-b7a7-4cf60032d43c","html_url":"https://github.com/oliverfindl/wp-cache","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/oliverfindl/wp-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverfindl%2Fwp-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverfindl%2Fwp-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverfindl%2Fwp-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverfindl%2Fwp-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliverfindl","download_url":"https://codeload.github.com/oliverfindl/wp-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverfindl%2Fwp-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32484352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","cms","memcached","php","php7","script","wordpress","wp-cache"],"created_at":"2024-10-26T20:42:30.265Z","updated_at":"2026-05-01T03:34:22.367Z","avatar_url":"https://github.com/oliverfindl.png","language":"PHP","funding_links":["https://paypal.me/oliverfindl"],"categories":[],"sub_categories":[],"readme":"# wp-cache\n\n![license](https://img.shields.io/github/license/oliverfindl/wp-cache.svg?style=flat)\n[![paypal](https://img.shields.io/badge/donate-paypal-blue.svg?colorB=0070ba\u0026style=flat)](https://paypal.me/oliverfindl)\n\nSimple cache script for [WordPress][WP] CMS based on [Memcached][MC]. Script also includes simple quota mechanism.\n\n\u003e This script is proof of concept. Never was used in production.\n\n---\n\n## Usage\n\nIf you completed the [installation](#install) and [setup](#setup) process, you should see new HTTP header called X-Cache-Status for each request telling you, if script is serving cached version or not. Additionally you get generation time displayed in comment at end of document. Cache is automatically turned off for logged users.\n\n## Requirements\n\n* [PHP 7][PHP-7]\n* [PHP Memcached extension][PHP-MC-EXT]\n* [Memcached][MC]\n* [WordPress][WP]\n\n## Install\n\n```bash\n# change directory to wp root\n$ cd /path/to/your/wp-root\n\n# clone this repo\n$ git clone https://github.com/oliverfindl/wp-cache.git wp-cache-temp\n\n# [optional] backup original .htaccess file if available\n$ mv .htaccess .htaccess.bak\n\n# copy wp-cache files from repo to wp root\n$ cp wp-cache-temp/src/{.htaccess,wp-cache.php} .\n\n# delete repo\n$ rm -r wp-cache-temp\n```\n\n## Setup\n\n```bash\n# update rewrite base to wp root\n$ vim .htaccess\n\n# set preferred options in wp-cache.php file\n$ vim wp-cache.php\n```\n\n## Options\n\n```php\ndefine(\"WP_INDEX_PATH\", __DIR__ . \"/index.php\"); // path to index.php file\ndefine(\"WP_LOAD_PATH\", __DIR__ . \"/wp-load.php\"); // path to wp-load.php file\n\ndefine(\"QUOTA_ENABLE\", false); // enable quota, format: true|false\ndefine(\"QUOTA_PERIOD\", 60); // value in seconds, format: integer\ndefine(\"QUOTA_LIMIT\", 60); // number of requests per QUOTA_PERIOD, format: integer\n\ndefine(\"CACHE_ENABLE\", true); // enable cache, format: true|false\ndefine(\"CACHE_PERIOD\", 5 * 60); // value in seconds, format: integer\ndefine(\"CACHE_SERVERS\", [ // array of memcached server configs, format: [ [ host, port ], ... ]\n\t[\"127.0.0.1\", 11211],\n//\t[\"mc0.example.com\", 11211],\n//\t[\"mc1.example.com\", 11211],\n//\t...\n]);\n```\n\n## Uninstall\n\n```bash\n# change directory to wp root\n$ cd /path/to/your/wp-root\n\n# remove wp-cache files\n$ rm {.htaccess,wp-cache.php}\n\n# [optional] restore .htaccess file from backup if available\n$ mv .htaccess.bak .htaccess\n```\n\n---\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\n[WP]: https://wordpress.org/\n[MC]: https://www.memcached.org/\n[PHP-7]: https://secure.php.net/manual/en/install.php\n[PHP-MC-EXT]: https://secure.php.net/manual/en/book.memcached.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverfindl%2Fwp-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverfindl%2Fwp-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverfindl%2Fwp-cache/lists"}