root/branch/rev3/common/admin/option_acache.php @ 245

Revision 245, 1.1 KB (checked in by exi, 13 years ago)

Fixed SQL Query caching.
Changed userportraits to use img/portraits.
Added JS code for IE/PNG-fix.

Line 
1<?php
2/*
3* This file contains the generic admin options in the new format
4* look here for some examples.
5*/
6
7options::cat('Advanced', 'Cache', 'Cache Control');
8options::fadd('Caching enabled', 'cache_enabled', 'checkbox');
9options::fadd('Cache directory', 'cache_dir', 'edit:size:40');
10options::fadd('Ignore pages', 'cache_ignore', 'edit:size:60');
11options::fadd('Cache times', 'cache_times', 'edit:size:60');
12
13options::cat('Advanced', 'Cache', 'Reinforced');
14options::fadd('Enable Reinforced Management', 'auto_reinforced', 'checkbox');
15options::fadd('Current Load', 'none', 'custom', array('admin_acache', 'showLoad'));
16options::fadd('Reinforcement threshold', 'reinforced_threshold', 'edit:size:4');
17options::fadd('Disabling threshold', 'reinforced_disable_threshold', 'edit:size:4');
18options::fadd('Reinforcement chance', 'reinforced_prob', 'edit:size:4');
19options::fadd('Reinforcement end chance', 'reinforced_rf_prob', 'edit:size:4');
20
21class admin_acache
22{
23    function showLoad()
24    {
25        $load = file_get_contents('/proc/loadavg');
26        $array = explode(' ', $load);
27        return (float)$array[0];
28    }
29}
30?>
Note: See TracBrowser for help on using the browser.