Title: CCF Not Cache Friendly
Last modified: August 20, 2016

---

# CCF Not Cache Friendly

 *  [dentm42](https://wordpress.org/support/users/dentm42/)
 * (@dentm42)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/ccf-not-cache-friendly/)
 * Just a note –
 * The implementation of CCF forces caching to be bypassed even on pages WITHOUT
   forms.
 * This is easily fixed. The file you need to edit is: custom-contact-forms-front.
   php
 * Comment out line 16 by putting a # in front – it should read:
    ` # ccf_utils::
   startSession();
 * Insert:
    ` ccf_utils::startSession();
 * After the line that reads (about line 198 or so):
    ` function getFormCode($form,
   $is_widget_form = false) {
 * And that should do it!
 * THE PROBLEM:
 * The function ccf_utils::startSession() creates a PHP session and sends back a
   cookie to the browser. This is needed for things like CAPTCHA and other features.
 * Because of the cookie for the PHP session, headers are sent back to the browser
   and the caching servers to prevent caching of the page.
 * Because ccf_utils::startSession() is in frontInit, a session is created on EVERY
   PAGE. However, it ISN’T needed when there is no form on the page.
 * Making the changes above means that a session is only initiated if/when there’s
   a form on the page.
 * Hope that helps others trying to make their site as speedy as possible
 * [http://wordpress.org/extend/plugins/custom-contact-forms/](http://wordpress.org/extend/plugins/custom-contact-forms/)

The topic ‘CCF Not Cache Friendly’ is closed to new replies.

 * ![](https://ps.w.org/custom-contact-forms/assets/icon-256x256.png?rev=1067156)
 * [Custom Contact Forms](https://wordpress.org/plugins/custom-contact-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-contact-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-contact-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-contact-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-contact-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-contact-forms/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [dentm42](https://wordpress.org/support/users/dentm42/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/ccf-not-cache-friendly/)
 * Status: not resolved