projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
05e6e4e
)
no_cache management added
author
Matteo Nastasi (mop)
<nastasi@alternativeoutput.com>
Wed, 3 Oct 2012 20:13:11 +0000
(22:13 +0200)
committer
Matteo Nastasi (mop)
<nastasi@alternativeoutput.com>
Wed, 3 Oct 2012 20:13:11 +0000
(22:13 +0200)
web/Obj/brisk.phh
patch
|
blob
|
history
web/Obj/sac-a-push.phh
patch
|
blob
|
history
web/briskin5/Obj/briskin5.phh
patch
|
blob
|
history
web/commons.js
patch
|
blob
|
history
web/xynt-http-streaming.js
patch
|
blob
|
history
diff --git
a/web/Obj/brisk.phh
b/web/Obj/brisk.phh
index
b52c333
..
af2a901
100644
(file)
--- a/
web/Obj/brisk.phh
+++ b/
web/Obj/brisk.phh
@@
-293,6
+293,13
@@
function mop_flush()
flush();
}
flush();
}
+function force_no_cache(&$header_out)
+{
+ $header_out['Pragma'] = 'no-cache, must-revalidate';
+ $header_out['Cache-Control'] = 'no-cache';
+ $header_out['Expires'] = '-1';
+}
+
function file_lock($fname, $is_exclusive)
{
if (($res = @fopen($fname, "r+")) == FALSE) {
function file_lock($fname, $is_exclusive)
{
if (($res = @fopen($fname, "r+")) == FALSE) {
@@
-2179,6
+2186,8
@@
class Room {
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
+ force_no_cache($header_out);
+
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
@@
-2189,6
+2198,8
@@
class Room {
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
+ force_no_cache($header_out);
+
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
diff --git
a/web/Obj/sac-a-push.phh
b/web/Obj/sac-a-push.phh
index
4a325da
..
e57879f
100644
(file)
--- a/
web/Obj/sac-a-push.phh
+++ b/
web/Obj/sac-a-push.phh
@@
-284,7
+284,7
@@
class Sac_a_push {
}
$write = NULL;
$except = NULL;
}
$write = NULL;
$except = NULL;
- $num_changed_sockets = stream_select($read, $write, $except,
0, 25000
0);
+ $num_changed_sockets = stream_select($read, $write, $except,
5,
0);
if ($num_changed_sockets == 0) {
printf(" no data in 5 secs ");
if ($num_changed_sockets == 0) {
printf(" no data in 5 secs ");
diff --git
a/web/briskin5/Obj/briskin5.phh
b/web/briskin5/Obj/briskin5.phh
index
2bdb236
..
f4e266d
100644
(file)
--- a/
web/briskin5/Obj/briskin5.phh
+++ b/
web/briskin5/Obj/briskin5.phh
@@
-747,6
+747,8
@@
class Bin5 {
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
+ force_no_cache($header_out);
+
$pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content);
if ($pgflush->try_flush($curtime) == FALSE) {
$pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content);
if ($pgflush->try_flush($curtime) == FALSE) {
@@
-1269,6
+1271,8
@@
class Bin5 {
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
+ force_no_cache($header_out);
+
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
@@
-1280,6
+1284,8
@@
class Bin5 {
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
+ force_no_cache($header_out);
+
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
$s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content);
return TRUE;
diff --git
a/web/commons.js
b/web/commons.js
index
f0ea078
..
99a2983
100644
(file)
--- a/
web/commons.js
+++ b/
web/commons.js
@@
-249,6
+249,7
@@
function send_mesg(mesg)
// alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn);
xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
// alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn);
xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
+ xhr_wr.setRequestHeader("If-Modified-Since", new Date().toUTCString());
xhr_wr.onreadystatechange = function() { return; };
if (typeof(g_debug) == 'number' && g_debug > 0
&& typeof(console) == 'object' && typeof(console.log) == 'function') {
xhr_wr.onreadystatechange = function() { return; };
if (typeof(g_debug) == 'number' && g_debug > 0
&& typeof(console) == 'object' && typeof(console.log) == 'function') {
diff --git
a/web/xynt-http-streaming.js
b/web/xynt-http-streaming.js
index
0cbf36b
..
7d216aa
100644
(file)
--- a/
web/xynt-http-streaming.js
+++ b/
web/xynt-http-streaming.js
@@
-39,7
+39,8
@@
http_streaming.prototype = {
keepalives_equal: 0,
keepalives_eq_max: 6,
/* NOTE: right watch_timeout value to 100, for devel reasons use 1000 or more */
keepalives_equal: 0,
keepalives_eq_max: 6,
/* NOTE: right watch_timeout value to 100, for devel reasons use 1000 or more */
- watchdog_timeout: 200,
+ // FIXME watchdog_timeout: 200,
+ watchdog_timeout: 2000,
watchdog_ct: 0,
watchdog_checktm: 20,
watchable: false,
watchdog_ct: 0,
watchdog_checktm: 20,
watchable: false,