<?php
/**
 * Clear PHP opcache and object cache
 * Run this after code changes to ensure fresh files are loaded
 */

// Clear opcache if available
if (function_exists('opcache_reset')) {
    opcache_reset();
    echo "✅ OPcache cleared\n";
} else {
    echo "ℹ️  OPcache not available\n";
}

// Clear WordPress object cache if available
if (function_exists('wp_cache_flush')) {
    wp_cache_flush();
    echo "✅ WordPress object cache cleared\n";
}

// Clear transients
if (function_exists('delete_expired_transients')) {
    delete_expired_transients();
    echo "✅ Expired transients cleared\n";
}

echo "\n🎉 Cache cleared! Reload your browser and try again.\n";
