{"id":23884737,"url":"https://github.com/cachewerk/relay-wp-l10n","last_synced_at":"2025-02-23T01:41:43.569Z","repository":{"id":192138978,"uuid":"686078407","full_name":"cachewerk/relay-wp-l10n","owner":"cachewerk","description":"Use Relay to store WordPress translation in PHP runtime memory.","archived":false,"fork":false,"pushed_at":"2025-01-22T17:29:54.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T18:29:56.851Z","etag":null,"topics":["redis","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://relay.so","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/cachewerk.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}},"created_at":"2023-09-01T17:30:14.000Z","updated_at":"2025-01-22T17:29:57.000Z","dependencies_parsed_at":"2023-12-06T00:25:00.449Z","dependency_job_id":"767c080c-5060-4e50-9b5a-90c7502c5b87","html_url":"https://github.com/cachewerk/relay-wp-l10n","commit_stats":null,"previous_names":["cachewerk/relay-wp-l10n"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachewerk%2Frelay-wp-l10n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachewerk%2Frelay-wp-l10n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachewerk%2Frelay-wp-l10n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachewerk%2Frelay-wp-l10n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cachewerk","download_url":"https://codeload.github.com/cachewerk/relay-wp-l10n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240258162,"owners_count":19772969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["redis","wordpress-plugin"],"created_at":"2025-01-04T03:17:55.197Z","updated_at":"2025-02-23T01:41:43.552Z","avatar_url":"https://github.com/cachewerk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Localization cache using Relay\n\nUse [Relay](https://relay.so) to store WordPress translation in PHP runtime memory.\n\n## Installation\n\nInstall as plugin, or Must-Use plugin.\n\n### Composer installation\n\nTo install the plugin using Composer, add the repository to your `composer.json`:\n\n```json\n{\n  \"repositories\": [\n    { \"type\": \"vcs\", \"url\": \"git@github.com:cachewerk/relay-wp-l10n.git\" }\n  ],\n}\n```\n\nThen simply run:\n\n```bash\ncomposer require cachewerk/relay-wp-l10n\n```\n\n## Caveats\n\n1. If `RELAY_L10N_CONFIG` is not set, the plugin will do nothing\n2. Translations are invalidated using `FLUSHDB`, be sure to set a dedicated `database` for translations so it won't flush the regular object cache as well\n3. Relay's `Table` class currently caches data on a per-worker basis, so the cache needs to warm up for all workers in a FPM pool\n\n## Configuration\n\nAdd the `RELAY_L10N_CONFIG` constant to your `wp-config.php`.\n\n```php\ndefine('RELAY_L10N_CONFIG', [\n    'host' =\u003e $_SERVER['CACHE_HOST'],\n    'port' =\u003e $_SERVER['CACHE_PORT'],\n    'database' =\u003e $_SERVER['CACHE_DB'] + 1,\n    'password' =\u003e $_SERVER['CACHE_PASSWORD'],\n] );\n```\n\n### Default configuration\n\n| Option           | Default     | Description |\n| ---------------- | ----------- | ----------- |\n| `scheme`         | `tcp`       | |\n| `host`           | `127.0.0.1` | |\n| `port`           | `6379`      | |\n| `database`       | `0`         | |\n| `username`       |             | |\n| `password`       |             | |\n| `prefix`         |             | |\n| `timeout`        | `0.5`       | |\n| `read_timeout`   | `0.5`       | |\n| `backoff`        | `smart`     | Supports: `none`, `smart` |\n| `retries`        | `3`         | |\n| `retry_interval` | `20`        | |\n| `tls_options`    | `false`     | |\n| `persistent`     | `false`     | Whether to use a persistent connection |\n| `footnote`       | `true`      | Whether to print a HTML comment with statistics |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachewerk%2Frelay-wp-l10n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcachewerk%2Frelay-wp-l10n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachewerk%2Frelay-wp-l10n/lists"}