still on 4.0.18, but found a configuration which works to cache only test.php but not testnocache.php
htaccess
Code:
RewriteEngine on
RewriteRule test.php - [E=Cache-Control:max-age=45]
cache policy set to
Code:
Enable Cache:Not set
Cache Expire Time (seconds): 120
Cache Request with Query String:Not set
Cache Request with Cookie:Not set
Cache Response with Cookie:Not set
Ignore Request Cache-Control:Not set
Ignore Response Cache-Control:Not set
httpd.conf set to
Code:
#disk cache
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheRoot /lscache/
#CacheEnable disk /
</IfModule>
</IfModule>
testnocache.php
Code:
Server Software: LiteSpeed
Server Hostname: 192.168.56.101
Server Port: 80
Document Path: /testnocache.php
Document Length: 63 bytes
Concurrency Level: 200
Time taken for tests: 0.201163 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 286000 bytes
HTML transferred: 63000 bytes
Requests per second: 4971.09 [#/sec] (mean)
Time per request: 40.233 [ms] (mean)
Time per request: 0.201 [ms] (mean, across all concurrent requests)
Transfer rate: 1386.94 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 17 11.3 17 40
Processing: 5 21 7.1 21 66
Waiting: 0 14 9.0 15 59
Total: 5 38 8.6 38 80
Percentage of the requests served within a certain time (ms)
50% 38
66% 42
75% 44
80% 45
90% 47
95% 49
98% 51
99% 74
100% 80 (longest request)
Code:
ls -alhR
.:
total 12K
drwxrwxrwx 2 nobody nobody 4.0K Jan 21 10:10 .
drwxr-xr-x 25 root root 4.0K Jan 21 10:03 ..
test.php properly cached
Code:
ab -n 1000 -c 200 192.168.56.101/test.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.56.101 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: LiteSpeed
Server Hostname: 192.168.56.101
Server Port: 80
Document Path: /test.php
Document Length: 63 bytes
Concurrency Level: 200
Time taken for tests: 0.61408 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 287144 bytes
HTML transferred: 63252 bytes
Requests per second: 16284.52 [#/sec] (mean)
Time per request: 12.282 [ms] (mean)
Time per request: 0.061 [ms] (mean, across all concurrent requests)
Transfer rate: 4559.67 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 2.2 2 9
Processing: 3 8 2.5 9 16
Waiting: 1 3 1.5 3 9
Total: 3 10 3.1 11 22
Percentage of the requests served within a certain time (ms)
50% 11
66% 12
75% 13
80% 13
90% 14
95% 15
98% 17
99% 18
100% 22 (longest request)
Code:
ls -alhR
.:
total 16K
drwxrwxrwx 3 nobody nobody 4.0K Jan 21 10:16 .
drwxr-xr-x 25 root root 4.0K Jan 21 10:03 ..
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 9
./9:
total 12K
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 .
drwxrwxrwx 3 nobody nobody 4.0K Jan 21 10:16 ..
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 f
./9/f:
total 12K
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 .
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 ..
drwx------ 2 nobody nobody 4.0K Jan 21 10:16 2
./9/f/2:
total 12K
drwx------ 2 nobody nobody 4.0K Jan 21 10:16 .
drwx------ 3 nobody nobody 4.0K Jan 21 10:16 ..
-rw------- 1 nobody nobody 215 Jan 21 10:16 9f283728