mirror of
https://github.com/kennethreitz-archive/wordpress-skeleton.git
synced 2026-06-20 15:40:58 +00:00
75 lines
4.1 KiB
PHTML
75 lines
4.1 KiB
PHTML
<?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
|
|
|
|
<h3>Database Caching Settings</h3>
|
|
|
|
<form action="options-general.php">
|
|
<p>
|
|
Database caching is currently <span class="w3tc-<?php if ($dbcache_enabled): ?>enabled">enabled<?php else: ?>disabled">disabled<?php endif; ?></span>.
|
|
<input type="submit" name="flush_dbcache" value="Empty cache"<?php if (! $dbcache_enabled): ?> disabled="disabled"<?php endif; ?> class="button" />
|
|
<input type="hidden" name="page" value="<?php echo W3TC_FILE; ?>" />
|
|
<input type="hidden" name="tab" value="<?php echo $this->_tab; ?>" />
|
|
</p>
|
|
</form>
|
|
|
|
<form action="options-general.php?page=<?php echo urldecode(W3TC_FILE); ?>&tab=<?php echo $this->_tab; ?>" method="post">
|
|
<fieldset>
|
|
<legend>General</legend>
|
|
|
|
<table class="form-table">
|
|
<tr>
|
|
<th colspan="2">
|
|
<input type="hidden" name="dbcache.reject.logged" value="0" />
|
|
<label><input type="checkbox" name="dbcache.reject.logged" value="1"<?php checked($this->_config->get_boolean('dbcache.reject.logged'), true); ?> /> Don't cache queries for logged in users</label>
|
|
<br /><span class="description">Enabling this option is recommended to allow default WordPress behavior.</span>
|
|
</th>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class="submit">
|
|
<input type="submit" name="Submit" class="button-primary" value="Save changes" />
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Advanced</legend>
|
|
|
|
<table class="form-table">
|
|
<?php if ($this->_config->get_string('dbcache.engine') == 'memcached'): ?>
|
|
<tr>
|
|
<th><label for="memcached_servers">Memcached hostname:port / <acronym title="Internet Protocol">IP</acronym>:port:</label></th>
|
|
<td>
|
|
<input id="memcached_servers" type="text" name="dbcache.memcached.servers" value="<?php echo htmlspecialchars(implode(',', $this->_config->get_array('dbcache.memcached.servers'))); ?>" size="100" />
|
|
<input id="test_memcached" class="button" type="button" value="Test" />
|
|
<span id="test_memcached_status" class="w3tc-status w3tc-process"></span>
|
|
<br /><span class="description">Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122</span>
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<tr>
|
|
<th style="width: 250px;"><label for="dbcache_lifetime">Maximum lifetime of cache objects:</label></th>
|
|
<td><input id="dbcache_lifetime" type="text" name="dbcache.lifetime" value="<?php echo $this->_config->get_integer('dbcache.lifetime'); ?>" size="8" /> seconds
|
|
<br /><span class="description">Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th><label for="dbcache_file_gc">Garbage collection interval:</label></th>
|
|
<td><input id="dbcache_file_gc" type="text" name="dbcache.file.gc" value="<?php echo $this->_config->get_integer('dbcache.file.gc'); ?>" size="8" /> seconds
|
|
<br /><span class="description">If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th valign="top"><label for="dbcache_reject_sql">Ignored query stems:</label></th>
|
|
<td>
|
|
<textarea id="dbcache_reject_sql" name="dbcache.reject.sql" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('dbcache.reject.sql'))); ?></textarea><br />
|
|
<span class="description">Do not cache queries that contain these terms. Any entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_).</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p class="submit">
|
|
<input type="submit" name="Submit" class="button-primary" value="Save changes" />
|
|
</p>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<?php include W3TC_DIR . '/inc/options/common/footer.phtml'; ?> |