another one weirdness
Antony Dovgal
tony2001@phpclub.net
Thu, 8 Apr 2004 21:18:40 +0400
Hi again.
I've got another one question about flush_all.
Just found an interesting effect:
After FLUSH_ALL some subsequent SET's report OK (i.e. "STORED"), but GET's fail.
But if do FLUSH_ALL and than sleep() for a second, subsequent SET's and GET's work ok.
Two small examples:
This doesn't work:
<5 flush_all
>5 OK
<5 set test1 0 0 1
>5 STORED
<5 set test2 0 0 1
>5 STORED
<5 set test3 0 0 1
>5 STORED
<5 get test1
>5 END
<5 get test2
>5 END
<5 get test3
>5 END
And this does:
<5 flush_all
>5 OK
/* sleep(1) here */
<5 set test1 0 0 1
>5 STORED
<5 set test2 0 0 1
>5 STORED
<5 set test3 0 0 1
>5 STORED
<5 get test1
>5 sending key test1
>5 END
<5 get test2
>5 sending key test2
>5 END
<5 get test3
>5 sending key test3
>5 END
As I understand this happens because FLUSH_ALL needs some time to flush the cache, and items, that were set by these SET's are flushed too.
This could be confusing a bit.
Can someone please comment this?
Or I have to live with it and consider it a feature?
Thanx in advance.
---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com