Title: clean_site_cache
Published: August 16, 2016
Last modified: May 20, 2026

---

# do_action( ‘clean_site_cache’, string $id, WP_Site $blog, string $domain_path_key )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#wp--skip-link--target)

Fires immediately after a site has been removed from the object cache.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#parameters)󠁿

 `$id`string

Site ID as a numeric string.

`$blog`[WP_Site](https://developer.wordpress.org/reference/classes/wp_site/)

Site object.

`$domain_path_key`string

md5 hash of domain and path.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#source)󠁿

    ```php
    do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-site.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/ms-site.php#L1007)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/ms-site.php#L1007-L1007)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#related)󠁿

| Used by | Description | 
| [clean_blog_cache()](https://developer.wordpress.org/reference/functions/clean_blog_cache/)`wp-includes/ms-site.php` |

Clean the blog cache

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/clean_site_cache/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fclean_site_cache%2F)
before being able to contribute a note or feedback.