Reputation: 13
I am working in my project for the university with symfony2, and I have a problem since two days ago which I have not idea how to resolve.
I need a global variable shared between various users (various user sessions) but I don't know where I have to declare it.
I would like when user A change this variable then user B can read this variable updated.
Likely it is not possible but I am new in symfon2 and I am not sure.
Sorry if I have any mistake in the redaction but I am learning English now :)
Upvotes: 0
Views: 632
Reputation: 401
You can write that variable to file or cache (apc-cache, for example). Cache will be shared between all requests, however, it has lifetime.
Upvotes: 1