Skip to content

[Question] is Parse Server using any memcache, global variable? #1833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kenglou opened this issue May 19, 2016 · 7 comments
Closed

[Question] is Parse Server using any memcache, global variable? #1833

kenglou opened this issue May 19, 2016 · 7 comments

Comments

@kenglou
Copy link

kenglou commented May 19, 2016

as titled. Just curious as if I store some configuration on server, is that means everytime when i want to call cloudcode and I want to access the config, Parse Server will need to re-create the variable or fetch it from database in order to process the logic? This is important since we are planning to do some logic calculation online soon.

@drew-gross
Copy link
Contributor

I'm not sure what you are asking here. Parse does not use memcache, but does have some global variables. If you are accessing your Parse Config from inside your Cloud Code, that is safe. If you have some other question, please clarify.

@kenglou
Copy link
Author

kenglou commented May 19, 2016

Hi,

Thank for your information, Clarification for my questions:

  1. It's to make sure that if every time i make a cloud function call, is Parse server will generate an instance that process that query, and shutdown once the query is completed? or Parse Server will reserved such instance for the next query?
  2. If I make a List of array stored in Global Variable and when there is a query, the List of array will pop a variable to be fetched. will that variable accessible by all query?

Hopefully i make this clear, sorry for my poor english.

Thank you.

@drew-gross
Copy link
Contributor

Parse Server stays running between queries. If you have a global variable in your cloud code, it will be accessed by all queries.

@kenglou
Copy link
Author

kenglou commented May 20, 2016

That means Parse Server doesn't keep anything in between queries except we put it on global variables?

@drew-gross
Copy link
Contributor

There is some caching built in, with a default TTL of 5 seconds. You can change that or disable caching entirely if you want.

@desamtralized
Copy link

@drew-gross how can it be changed? Thanks.

@flovilmart
Copy link
Contributor

@sambarboza you can try setting cacheAdapter: { ttl: 3600 } in your initialization code for enabling a cache of 1h for roles and users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants