Title: Code examples for WP-SuperCache hooks
Last modified: August 19, 2016

---

# Code examples for WP-SuperCache hooks

 *  [Adam Lee](https://wordpress.org/support/users/adam-lee/)
 * (@adam-lee)
 * [18 years ago](https://wordpress.org/support/topic/code-examples-for-wp-supercache/)
 * Hi,
 * I’m looking to add some caching to my WordPress site. I see WP-SuperCache is 
   recommended as the replacement for WP-Cache, so I’d like to go with that. My 
   only issue is that I’d like to be able to count my visitors, even when serving
   cached pages.
 * I know SuperCache has a built-in hook system that’s intended to support plugins.
   However, the documentation wasn’t very clear on how to use it, and if there are
   examples out there, my Google-fu wasn’t strong enough to find them. The sample
   code provided with the plugin, meanwhile, only confused me further with lines
   like this:
    `add_cacheaction( 'add_cacheaction', 'searchengine_phase2_actions');`
 * So, I’ve come here for advice. What’s the action I’m supposed to pass as the 
   first argument to add_cacheaction? Is it wp_head, the same as always? Do I have
   to use mfunc and mclude like WP-Cache required?
 * If anyone could answer these questions or otherwise point me in the right direction,
   I’d greatly appreciate it.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Adam Lee](https://wordpress.org/support/users/adam-lee/)
 * (@adam-lee)
 * [18 years ago](https://wordpress.org/support/topic/code-examples-for-wp-supercache/#post-769472)
 * Bump.
 * Should I assume no one else has gotten this working either?

Viewing 1 replies (of 1 total)

The topic ‘Code examples for WP-SuperCache hooks’ is closed to new replies.

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [caching](https://wordpress.org/support/topic-tag/caching/)
 * [wp-supercache](https://wordpress.org/support/topic-tag/wp-supercache/)

 * 1 reply
 * 1 participant
 * Last reply from: [Adam Lee](https://wordpress.org/support/users/adam-lee/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/code-examples-for-wp-supercache/#post-769472)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
