Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Created March 21, 2017 08:39
Show Gist options
  • Save remcotolsma/dc67d5281d8546aa9bbe15b1833836a4 to your computer and use it in GitHub Desktop.
Save remcotolsma/dc67d5281d8546aa9bbe15b1833836a4 to your computer and use it in GitHub Desktop.
Test WordPress transient system, we had some issues on SiteGround hosting with Memcached enabled.
<?php
define( 'WP_USE_THEMES', false );
require './wp-blog-header.php';
$test = get_site_transient( 'pronamic_transient_test' );
echo 'Get transient', '<br />';
if ( false === $test ) {
set_site_transient( 'pronamic_transient_test', time() );
echo 'Set transient', '<br />';
}
var_dump( $test );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment