From 44c2817e94d7bcfc4cffc0ec06a2a657ee28a2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 28 Nov 2023 03:16:53 +0100 Subject: [PATCH] Fix typos (#452) --- .circleci/config.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 2 +- object-cache.php | 12 ++++++------ readme.txt | 2 +- tests/phpunit/test-cache.php | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 169898a..5d5df5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: echo "GITHUB_TOKEN environment variables missing; assuming unauthenticated build" exit 0 fi - echo "Setting GitHub OAuth token with suppressed ouput" + echo "Setting GitHub OAuth token with suppressed output" { composer config -g github-oauth.github.com $GITHUB_TOKEN } &> /dev/null diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da8ed6c..f14dac9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Pull requests and issues are welcome! Development and releases are structured around two branches, `main` and `release`. The `main` branch is the default branch for the repository, and is the source and destination for feature branches. -We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevent updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`. +We prefer to squash commits (i.e. avoid merge PRs) from a feature branch into `main` when merging, and to include the PR # in the commit message. PRs to `main` should also include any relevant updates to the changelog in readme.txt. For example, if a feature constitutes a minor or major version bump, that version update should be discussed and made as part of approving and merging the feature into `main`. `main` should be stable and usable, though possibly a few commits ahead of the public release on wp.org. @@ -51,7 +51,7 @@ The behat tests require a Pantheon site with Redis enabled. Once you've created * `git pull origin release` * `git checkout main` * `git rebase release` - * Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new verison will be `1.2.4-dev`) + * Update the version number in all locations, incrementing the version by one patch version, and add the `-dev` flag (e.g. after releasing `1.2.3`, the new version will be `1.2.4-dev`) * Add a new `** X.Y.X-dev **` heading to the changelog * `git add -A .` * `git commit -m "Prepare X.Y.X-dev"` diff --git a/README.md b/README.md index b99b1d3..5ef75aa 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ This plugin is for the internal application object cache. It doesn't have anythi ### How do I disable the persistent object cache for a bad actor? ### -A page load with 2,000 Redis calls can be 2 full seonds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group: +A page load with 2,000 Redis calls can be 2 full seconds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group: wp_cache_add_non_persistent_groups( array( 'bad-actor' ) ); diff --git a/object-cache.php b/object-cache.php index b73eef1..c8a2fdf 100644 --- a/object-cache.php +++ b/object-cache.php @@ -255,7 +255,7 @@ function wp_cache_set( $key, $data, $group = '', $expire = WP_REDIS_DEFAULT_EXPI } /** - * Switch the interal blog id. + * Switch the internal blog id. * * This changes the blog id used to create keys in blog specific groups. * @@ -309,7 +309,7 @@ function wp_cache_add_redis_hash_groups( $groups ) { * This function is deprecated. Use wp_cache_switch_to_blog() instead of this * function when preparing the cache for a blog switch. For clearing the cache * during unit tests, consider using wp_cache_init(). wp_cache_init() is not - * recommended outside of unit tests as the performance penality for using it is + * recommended outside of unit tests as the performance penalty for using it is * high. * * @deprecated 3.5.0 @@ -538,7 +538,7 @@ public function decr( $key, $offset = 1, $group = 'default' ) { $offset = (int) $offset; - // If this isn't a persistant group, we have to sort this out ourselves, grumble grumble. + // If this isn't a persistent group, we have to sort this out ourselves, grumble grumble. if ( ! $this->_should_persist( $group ) ) { $existing = $this->_get_internal( $key, $group ); if ( empty( $existing ) || ! is_numeric( $existing ) ) { @@ -838,7 +838,7 @@ public function incr( $key, $offset = 1, $group = 'default' ) { $offset = (int) $offset; - // If this isn't a persistant group, we have to sort this out ourselves, grumble grumble. + // If this isn't a persistent group, we have to sort this out ourselves, grumble grumble. if ( ! $this->_should_persist( $group ) ) { $existing = $this->_get_internal( $key, $group ); if ( empty( $existing ) || ! is_numeric( $existing ) ) { @@ -993,7 +993,7 @@ public function stats() { } /** - * Switch the interal blog id. + * Switch the internal blog id. * * This changes the blog id used to create keys in blog specific groups. * @@ -1237,7 +1237,7 @@ public function check_client_dependencies() { * client. * * @param array $redis_server Parameters used to construct a Redis client. - * @return array Final parameters to use to contruct a Redis client with + * @return array Final parameters to use to construct a Redis client with * with defaults applied. */ public function build_client_parameters( $redis_server ) { diff --git a/readme.txt b/readme.txt index 9997eae..e96e524 100644 --- a/readme.txt +++ b/readme.txt @@ -90,7 +90,7 @@ This plugin is for the internal application object cache. It doesn't have anythi = How do I disable the persistent object cache for a bad actor? = -A page load with 2,000 Redis calls can be 2 full seonds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group: +A page load with 2,000 Redis calls can be 2 full seconds of object cache transactions. If a plugin you're using is erroneously creating a huge number of cache keys, you might be able to mitigate the problem by disabling cache persistency for the plugin's group: wp_cache_add_non_persistent_groups( array( 'bad-actor' ) ); diff --git a/tests/phpunit/test-cache.php b/tests/phpunit/test-cache.php index 4f5a84a..60fca41 100644 --- a/tests/phpunit/test-cache.php +++ b/tests/phpunit/test-cache.php @@ -1388,7 +1388,7 @@ public function test_switch_to_blog() { $val2 = rand_str(); if ( ! is_multisite() ) { - // Single site ingnores switch_to_blog(). + // Single site ignores switch_to_blog(). $this->assertTrue( $this->cache->set( $key, $val ) ); $this->assertEquals( $val, $this->cache->get( $key ) ); $this->cache->switch_to_blog( 999 ); @@ -1464,7 +1464,7 @@ public function test_wp_cache_replace() { wp_cache_replace( $key, $val2 ); $this->assertEquals( $val2, wp_cache_get( $key ) ); - // Non-existant key should fail + // Non-existent key should fail $this->assertFalse( wp_cache_replace( $fake_key, $val1 ) ); // Make sure $fake_key is not stored