[Owncloud] Session Handling

Evert Pot evert at rooftopsolutions.nl
Mon Oct 15 10:55:50 UTC 2012


On Oct 15, 2012, at 12:46 PM, Victor Dubiniuk <victor.dubiniuk at gmail.com> wrote:

> Hi,
> 
> In case of the webdav access session is not used hardly so the single session_start won't have a great influence on the performance.
> From the other hand the webdav clients that are not pass the session id while syncing. So one will get a new session on each request.
> It might cause issues like this one http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-1459

I would stongly advice using sessions for this very reason.

Sessions suck for a list of reasons. You're in a unique position when creating Web API's and WebDAV servers to avoid them completely; and this would be a very wise thing.

If you rely on sessions for some reason to make things faster, it's likely that your business logic is sub-optimal. Caching should really be handled on a different layer; functions should ideally not have a response that varies based on the contents of HTTP header, with the exception of the functions that are specifically built to handle this very thing.

So push your caching to a different layer, this will also benefit you when you need to pull in user-specific data for people who are not the currently logged-in user :)

Evert


More information about the Owncloud mailing list