[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-02-01 Thread Adam (Cloud Platform Support)
Writes using the GCS stream wrapper should be non-blocking (though you should be able to control the behavior using stream_set_blocking ). Reads are cached, so latency should not be an issue. On Tuesday, January 26, 2016 at 8:15:49 PM

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-02-01 Thread Stuart Langley
Writes using the GCS wrapper are most certainly blocking, and as they use URLFetch as the underlying transport then stream_set_blocking has no effect. On Tuesday, 2 February 2016 08:24:55 UTC+11, Adam (Cloud Platform Support) wrote: > > Writes using the GCS stream wrapper should be non-blocking

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-01-26 Thread Alex Kerr
Thanks Adam. The poster on Stack Overflow says he's seeing shared memcache cleared every 10 minutes or less. Is this typical? And, how does this compare with how often dedicated memcache is cleared - i.e. if I start paying for memcache does the flushing problem go away? On Tuesday, January 26,

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-01-26 Thread Alex Kerr
Actually further to my reply above, I found this old post recommending using Cloud Storage instead: https://groups.google.com/d/msg/google-appengine/ziMU2sXQg7c/5uat0Lxly2sJ - is this a good idea? Seems like it at first glance for the reasons mentioned (esp caching in memcache anyway). And

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-01-26 Thread Adam (Cloud Platform Support)
The frequency of cache clearances reported on the Stack Overflow is definitely not normal. The reason Memcache was chosen as the default session store is because it is cleared infrequently enough so as not to be noticed during the course of a single session, and session data is typically

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-01-26 Thread Alex Kerr
Thanks very much Adam. What's the latency like on Cloud Storage - would it still be usable as a session store? Also I thought I read somewhere that file writes to GCS (e.g. via the PHP wrapper) return immediately so don't hold up script execution (and thus response to the client) - is that

[google-appengine] Re: How to persist (PHP) sessions beyond shared memcache?

2016-01-25 Thread Adam (Cloud Platform Support)
I don't have a code sample, but you would need to create a custom session handler with session_set_save_handler() as per the suggestion provided in this post