-
Is there any easy way to put replicache into an offline mode, so that it neither pushes or pulls? Would be useful to isolate front-end issues while debugging. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Setting Setting a long |
Beta Was this translation helpful? Give feedback.
-
You actually need to set them to null, not empty string. Apologies.
…On Thu, May 5, 2022 at 9:22 PM Tom Locke ***@***.***> wrote:
Setting pullURL and pushURL to '' didn't work for me - Replicache was
still making requests and started getting 404s
Setting a long pushDelay and pullInterval did work.
—
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATUBEJZHH76BHGCEOFTI3VITCDDANCNFSM5U6N6CGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Or rather undefined. See:
https://doc.replicache.dev/api/interfaces/ReplicacheOptions#pullurl
…On Thu, May 5, 2022 at 9:26 PM Aaron Boodman ***@***.***> wrote:
You actually need to set them to null, not empty string. Apologies.
On Thu, May 5, 2022 at 9:22 PM Tom Locke ***@***.***> wrote:
> Setting pullURL and pushURL to '' didn't work for me - Replicache was
> still making requests and started getting 404s
>
> Setting a long pushDelay and pullInterval did work.
>
> —
> Reply to this email directly, view it on GitHub
> <#992 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAATUBEJZHH76BHGCEOFTI3VITCDDANCNFSM5U6N6CGA>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***
> com>
>
|
Beta Was this translation helpful? Give feedback.
-
This is confusing me. The code looks like both export class Replicache<MD extends MutatorDefs = {}> {
...
private _isPushDisabled() {
return this.pushURL === '' && this.pusher === defaultPusher;
}
private _isPullDisabled() {
return this.pullURL === '' && this.puller === defaultPuller;
} @tslocke Do you have a custom |
Beta Was this translation helpful? Give feedback.
pullURL
andpushURL
to''
. These are read/write so clearing them prevents next push/pul.pushDelay
to a large number in our tests. This prevents the automatic push after a mutation.pullInterval
is already pretty high (60s) but you can increase this too.puller
/pusher
.