You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by qaqabincs <lu...@gmail.com> on 2013/06/15 16:54:20 UTC

use cradle to delete db but cache didn't reset

I use node 0.8.18, express3.2.5, cradle0.6.6. my problem is : after I
saved a doc into db, then I delete db to reset my testcase env, but when
I save the doc with the same id, cradle told me that doc is exsited!
source code as follow:

|db.save(id, acct, callback0);
//in the callback0 ...
db.destroy(callback1);
//in the callback1 ...
db.create(callback2);
//in the callback2 ... 
db.get(id, callback);|

then I got the same acct document, it seems still in the cradle cache.

can I clean the cache the same time I delete the db ?



qaqabincs


Re: use cradle to delete db but cache didn't reset

Posted by muji <fr...@gmail.com>.
Just my two cents, I used cradle for quite some time but was irked by some
lacking features and idiosyncracies. I've recently switched to *nano* and
am much happier:

https://github.com/dscape/nano

I don't want caching, I don't want to set {raw: true} to stop it
automatically modifying view result sets etc.

If you don't want to switch to nano you can configure cradle with {cache:
false}.

Hope that helps...


On 15 June 2013 16:54, qaqabincs <lu...@gmail.com> wrote:

> I use node 0.8.18, express3.2.5, cradle0.6.6. my problem is : after I
> saved a doc into db, then I delete db to reset my testcase env, but when
> I save the doc with the same id, cradle told me that doc is exsited!
> source code as follow:
>
> |db.save(id, acct, callback0);
> //in the callback0 ...
> db.destroy(callback1);
> //in the callback1 ...
> db.create(callback2);
> //in the callback2 ...
> db.get(id, callback);|
>
> then I got the same acct document, it seems still in the cradle cache.
>
> can I clean the cache the same time I delete the db ?
>
>
>
> qaqabincs
>
>


-- 
mischa (aka muji).