Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
535ed7fd
Commit
535ed7fd
authored
Jul 01, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] remove logs from loader
parent
1bb7434e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Loader.purs
src/Gargantext/Hooks/Loader.purs
+6
-6
No files found.
src/Gargantext/Hooks/Loader.purs
View file @
535ed7fd
...
...
@@ -115,12 +115,12 @@ useCachedLoaderEffect { cacheEndpoint, keyFunc, loadRealData, path, state: state
R.setRef oPath path
let key = "loader--" <> (keyFunc path)
log2 "[useCachedLoader] key" key
--
log2 "[useCachedLoader] key" key
let keyCache = key <> "-cache"
localStorage <- R2.getls
mState <- WSS.getItem key localStorage
mCache <- WSS.getItem keyCache localStorage
log2 "[useCachedLoader] mState" mState
--
log2 "[useCachedLoader] mState" mState
launchAff_ $ do
case mState of
Nothing -> loadRealData key keyCache localStorage
...
...
@@ -128,17 +128,17 @@ useCachedLoaderEffect { cacheEndpoint, keyFunc, loadRealData, path, state: state
let parsed = parse stStr >>= decode
case parsed of
Left err -> do
liftEffect $ log2 "[useCachedLoader] err" err
--
liftEffect $ log2 "[useCachedLoader] err" err
loadRealData key keyCache localStorage
Right (st :: st) -> do
cacheReal <- cacheEndpoint path
liftEffect $ log2 "[useCachedLoader] cacheReal" cacheReal
--
liftEffect $ log2 "[useCachedLoader] cacheReal" cacheReal
case mCache of
Nothing -> do
liftEffect $ log2 "[useCachedLoader] no stored cache" Nothing
--
liftEffect $ log2 "[useCachedLoader] no stored cache" Nothing
loadRealData key keyCache localStorage
Just cache -> do
liftEffect $ log2 "[useCachedLoader] stored cache" cache
--
liftEffect $ log2 "[useCachedLoader] stored cache" cache
if cache == cacheReal then
-- yay! cache hit!
liftEffect $ setState $ const $ Just st
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment