File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ its cache if a value is not already present. Prime is asyncronous and returns a
5959
6060#### Dependency inject a Redis Connection
6161
62- ```
62+ ``` javascript
6363const redis = require (' redis' ).createClient ();
6464const RedisDataLoader = require (' redis-dataloader' )({ redis: redis });
6565```
@@ -69,7 +69,7 @@ const RedisDataLoader = require('redis-dataloader')({ redis: redis });
6969Each Dataloader holds its own local in memory cache (Same as Facebook Dataloader),
7070and additionally caches to your Redis instance.
7171
72- ```
72+ ``` javascript
7373const loader = new RedisDataLoader (' <redis key prefix>' , ' <Facebook Dataloader>' , ' <Options>' );
7474```
7575
@@ -109,7 +109,7 @@ finally checking your underlying datastore. This pattern may be desirable if for
109109example you create a new DataLoader for each request. If your dataloader is long-lived
110110you may want to disable to the local cache, and just rely on the redis cache instead
111111
112- ```
112+ ``` javascript
113113const loader = new RedisDataLoader (' prefix' , new DataLoader (), { cache: false });
114114```
115115
You can’t perform that action at this time.
0 commit comments