Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I cache the data in Meteor?
    primarykey
    data
    text
    <p>thanks everyone! recently i want to built a small cms on meteor,but have some question</p> <p>1,cache,page cache,data cache,etc..</p> <p>For example,when people search some article</p> <p>in server side:</p> <pre><code> Meteor.publist('articles',function(keyword){ return Articles.find({keyword:keyword}); }); </code></pre> <p>in client:</p> <pre><code>Meteor.subscribe('articles',keyword); </code></pre> <p>that's ok ,but ...... the question is ,everytime people doing so ,it invoke a mongo query,and reduce the performance, in other framework use common http or https,people can depend on something like squid or varnish to cache the page or data,so everytime you route to a url,you read data from the cache server ,but Meteor built on socket.js or websocket,and I don't know how to cache throught the socket.......I trid varnish ,but seen no effect. so,may be it ignore the websocket?is there some method to cache the data,in the mongodb,in server,can i add some cache server ?</p> <p>2, chat</p> <p>I see the chatroom example in <a href="https://github.com/zquestz/simplechat" rel="noreferrer">https://github.com/zquestz/simplechat</a> But unlike implyment using socket.js,this example save the chat message in the mongodb ,so the data flow is message ->mongo->query->people,this invoke the mongo query too! and in socket.js,just save the socket in the context(or the server side cache),so the data don't go throught the db. My question is , is there a socket interface in Meteor ,so I can message->socket->people? and if can't , how is the performace in the productive envirment as the chatroom example doing(i see it runs slow ...)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload