Skip to content
  • Caches used in NodeBB

    NodeBB Development
    6
    6 Votes
    6 Posts
    509 Views
    barisB

    If you are going to store a lot of stuff I would use ./src/cacheCreate to create my own, ./src/cache is for a few stuff that never changes like the list of categories etc. If you put a lot of your own stuff in there like urls for link-previews it will negatively effect the performance. For stuff like that just create your own lru cache.

  • 0 Votes
    2 Posts
    657 Views
    barisB

    In your setup redis will be used for sessions, pubsub and socket.io will use it to pass around messages.

    Each nodejs process has it's own post cache, you can see the caches at /admin/advanced/cache.

    Redis pubsub is also used to clear cache on the other nodejs process when it is cleared on one nodejs process. For example when a post is edited it's cache will be cleared on the other nodes.

  • 0 Votes
    10 Posts
    1k Views
    julianJ

    @PitaJ A separate process just for running jobs would be ideal and future-ready, though we don't do that currently.

  • 1 Votes
    1 Posts
    1k Views
    V

    I would like to make my NodeBB forum to write a cookie when the

    I found the function that is executed when user is logged in successfully: authenticationController.onSuccessfulLogin.

    How to make this function also to write a cookie?

    I tried to guess, but it did not work:

    req.cookie('loggedin', '1'); res.cookie('loggedin', '1');

    Also I would like this cookie to be removed when the user is not logged in.

    I need this cookie in order to make another layer of caching (for non-logged in users) using Nginx and to test how it will work.

    Is it possible this to be made by a plugin?

  • Reset cache

    Solved Plugin Development
    4
    0 Votes
    4 Posts
    3k Views
    P

    @baris refactored the post tools and topic tools to load on demand for perf reasons, so I think the plugin needs to be updated for this change

  • 0 Votes
    5 Posts
    3k Views
    ?

    Okay, I found the solution:

    removed line - npm i nodebb-theme-vanilla nodebb-theme-lavender nodebb-widget-essentials
    (www/nodebb).
    Now the templates are not updated. (I have changed theme and it would be cancel changes.)

    I perform the command ./nodebb upgrade

    I perform the command ./nodebb restart

    Now all the people will be taken new changes.