These are chat archives for 47deg/fetch

17th
Aug 2017
Mayhem
@mayhemm
Aug 17 2017 14:23
Hello
How is the chaching part of Fetch implemented?
Peter Neyens
@peterneyens
Aug 17 2017 14:24
Hi
Mayhem
@mayhemm
Aug 17 2017 14:24
Hey there Peter
Peter Neyens
@peterneyens
Aug 17 2017 14:25
It uses a State monad to thread an instance of DataSourceCache through the computation
Mayhem
@mayhemm
Aug 17 2017 14:26
mmm okay. it will take me a while to grok that you just say
Peter Neyens
@peterneyens
Aug 17 2017 14:26
By default it uses an InMemoryCache but you can implement DataSourceCache yourself to use something else
Mayhem
@mayhemm
Aug 17 2017 14:26
nice
Peter Neyens
@peterneyens
Aug 17 2017 14:26
Anything I can do to speed that up?
Mayhem
@mayhemm
Aug 17 2017 14:26
Look, I implemented some sort of Flyweight pattern with a TrieMap and objects
basically what I need is to cache in memory for the duration of the jvm session some objects
I belive this lib is up to it right?
oh btw, does this lib works with scala 2.10?
Peter Neyens
@peterneyens
Aug 17 2017 14:28
If it is just the caching you need, fetch isn't really what you want.
The current release does. The next release will not any more.
Mayhem
@mayhemm
Aug 17 2017 14:30
mm
ok. changing subjects. why did you use the word "thread" on your explanation
can you elaborate?
Peter Neyens
@peterneyens
Aug 17 2017 14:32
I didn't mean thread as in multithreading.
Mayhem
@mayhemm
Aug 17 2017 14:32
i know
you use it like "inject"?
Peter Neyens
@peterneyens
Aug 17 2017 14:33
Pass around ?
Mayhem
@mayhemm
Aug 17 2017 14:33
Yup.
Peter Neyens
@peterneyens
Aug 17 2017 14:33
A state monad is sort of functional alternative for mutable variables.
Mayhem
@mayhemm
Aug 17 2017 14:33
oh yeah
I know ST monad quite well
I funny that the implementation I did before knowing anything about Fetch
is quite similar, type wise, to this lib
Chris Vale
@chris-vale-ck
Aug 17 2017 17:42
@peterneyens is there anyway I could convince you to cut a small release of fetch with the twitter support in it? we're a heavy finagle shop and it's going to be a while before I can fully move to finagle 7 (and cats-1 and cats-effect) It's really only bookkeeping but moving from an internally built version to the public version makes some difference to me
Peter Neyens
@peterneyens
Aug 17 2017 18:54
We might be able to do a 0.6.3 before we do 0.7.0