Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1490139

    We use the Enfold theme and WP Fastest Cache. When Enfold creates a new dynamic CSS file under “wp-content/uploads/dynamic_avia/avia-merged-styles-*.css,” the cache still wants to serve the old CSS file, which has already been deleted. This results in an unformatted page.
    WP Fastest Cache has options for clearing the cache when pages are created or modified. However, this doesn’t seem to be sufficient.

    Do you have a hook that executes when a new CSS file is generated that we can use to clear the cache?

    #1490158

    Hey xela,

    Thank you for the inquiry.

    You may need to resave the theme options before purging the plugin cache. Also, make sure that only one compression or minification option is enabled, either in the theme options or in the compression options offered by the plugin. Enabling both may cause issues. We also recommend disabling the cache plugin while configuring the site.

    Let us know the result.

    Best regards,
    Ismael

    #1490185

    Dear Isamel,
    Thank you for your message, but unfortunately, the question has not been answered:
    I was referring to a notification from the theme as soon as the CSS file is regenerated. This is called a hook.
    Thanks again! :)

    #1490231

    Hi,

    Thank you for the update.

    What do you mean by “notification”? Would you mind providing an example or reference? If you’re looking for a list of hooks, you can try the following.

    // reset post meta and delete all css files
    add_action( 'ava_after_theme_update', array( $this, 'handler_ava_reset_css_files' ), 100, 1 );
    add_action( 'ava_after_import_demo_settings', array( $this, 'handler_ava_reset_css_files'), 100, 1 );
    add_action( 'avia_ajax_after_save_options_page', array( $this, 'handler_ava_reset_css_files'), 100, 1 );

    These are from enfold/config-templatebuilder/avia-template-builder/php/class-post-css-management.php file. Feel free to update us if you need more info.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.