by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 26 2016 19:45
    guilhermeaiolfi commented #322
  • Apr 26 2016 19:33
    k2s commented #322
  • Apr 26 2016 19:28
    jmdobry commented #322
  • Apr 26 2016 19:13
    k2s commented #322
  • Apr 26 2016 19:07
    guilhermeaiolfi commented #322
  • Apr 26 2016 12:12
    k2s opened #322
  • Apr 26 2016 04:36
    jmdobry synchronize #264
  • Apr 26 2016 04:36

    jmdobry on v3

    Improved JSDocs (compare)

  • Apr 24 2016 17:53
    remicastaing commented #321
  • Apr 24 2016 17:53
    remicastaing closed #321
  • Apr 24 2016 17:35
    jmdobry labeled #321
  • Apr 24 2016 17:35
    jmdobry commented #321
  • Apr 24 2016 14:23
    remicastaing opened #321
  • Apr 23 2016 22:57
    jmdobry synchronize #264
  • Apr 23 2016 22:57

    jmdobry on v3

    Improved JSDocs (compare)

  • Apr 23 2016 08:19
    jmdobry synchronize #264
  • Apr 23 2016 08:19

    jmdobry on v3

    Improved JSDocs (compare)

  • Apr 22 2016 08:41
    jmdobry edited #320
  • Apr 22 2016 08:41
    georgi-kovachev closed #320
  • Apr 22 2016 08:41
    georgi-kovachev commented #320
Sisir
@prionkor
let me check
got it..
I will get back to you soon
Grégory Copin
@Gregcop1
ok
Sisir
@prionkor
oh okay, so here is the problem I was facing. When i do store.findAll() it always calls server. For second time it doesn't return from store..
Sisir
@prionkor
this is what findAll() suppose to do. I guess my problem is to switch between findAll() & getAll()
Grégory Copin
@Gregcop1
it's supposed to do the job himself
if cache is activated, js-data checks in its memory and if the cache has expired it ask to adapter
Sisir
@prionkor
const dataStore = new DataStore({
    useFilter: true,
    //maxAge: 60 * 60 * 1000, // one hour max age
});
this is how I am initializing datastore
Grégory Copin
@Gregcop1
can you try a maxAge to 1ms
just for test
I'm sorry, I don't use js-data everyday. When it's well configured for a project you don't have do return to it anymore :)
Grégory Copin
@Gregcop1
can you try the option "force"
store.findAll('post', {}, { force: true });
it's supposed to bypass cache
Sisir
@prionkor
note, I am not getting the empty array
it always calls server and returns data
sorry about the confusion it does..
trying the force now
So, Here is the problem (no confusion now >_< )
Sisir
@prionkor
when I have empty query it doesn't have problem.. ( calls server frist time, loads from cache next time)
when I have query then it have the problem..
store.findAll('post', {}, { force: true });  // without query no problem
store.findAll('post', {parent:null, _limit: 50, _offset: 1});  // without query problem, empty array when loads from cache.
Sisir
@prionkor

Found a workaround..

First I try the sync methods like store.filter() to get data. If data is empty ( meaning never queried before) then call findAll()

:)
Alex Alexandrov
@rapidexact
Hi all.
I have a question.
If i invoke find, or findAll methods from few places at same time, then i will get few requests to server, or one request ?
Olson3R
@Olson3R
@rapidexact My thoughts are... Due to the nature of JavaScript/Node, the requests will not happen at the same time since it is single threaded. If the requests are similar enough, the first request might get sent and the response stored in the data store. Subsequent requests might be satisfied with the data in the cache and not require external api calls.
Luis Vargas
@luisvt
Hello
Is this group still active?