Skip to content

Commit

Permalink
Fix typos (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Nov 28, 2023
1 parent 154aa80 commit 44c2817
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );

Expand Down
12 changes: 6 additions & 6 deletions object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );

Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/test-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 44c2817

Please sign in to comment.