Skip to content

Commit a860188

Browse files
authored
Merge pull request #18 from oslabs-beta/EC/updateReadme
update readme
2 parents c5f7293 + 6dee551 commit a860188

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,16 @@ const App = () => {
107107
};
108108
```
109109

110-
## Selecting useCache, LFU/LRU/WTinyLFU, capacity, persistQueries, and searchTerms (if any); default (if not provided): true, LFU, 2000, false
110+
## Selecting options for the Wrapper
111111

112112
```javascript
113-
<ObsidianWrapper useCache={true} algo='LRU' capacity='5000' persistQueries={true} searchTerms={['title', 'director', 'genre']}>
113+
<ObsidianWrapper
114+
useCache={true} // Boolean indicating whether to use client-side cache, default to true
115+
algo='LRU' // String indicating cache policy to use for client-side cache, default to LFU. OTHER OPTIONS: W-Tiny-LFU, LRU
116+
capacity='5000' // String indicating numeric capacity of cache, default to 2000
117+
persistQueries={true} // Boolean indicating wheter to use persistent queries, default to false
118+
searchTerms={['title', 'director', 'genre']} // Optional parameter to set search terms of the data
119+
>
114120
<MovieApp />
115121
</ObsidianWrapper>
116122
```
@@ -176,6 +182,17 @@ const MovieApp = () => {
176182
);
177183
}
178184
```
185+
## Setting up Redis
186+
187+
In order to utilize server side caching, a Redis instance must be available and running. Redis installation and quick-start documentation can be found [here](https://redis.io/docs/getting-started/). Make sure to keep a redis instance running whenever the application is utilizing server side caching to avoid running into issues.
188+
189+
To connect Obsidian to Redis, create a .env file in the root directory of the application with the following information:
190+
191+
```javascript
192+
REDIS_HOST= //string of redis host name, typically defaulted to '127.0.0.1' by Redis
193+
```
194+
Be sure to also specify the Redis TCP port by passing in the port number as an argument into Obsidian Router (see Selecting options for the Router above).
195+
179196

180197
## Documentation
181198

0 commit comments

Comments
 (0)