2

Preface

  • Normally, a session in a web application stores data for a specific user (and its data is available across any visit of the user to the same web server/site).

  • Embperl (a templated web development framework in Perl) has a very interesting feature: user-independent session data stored/retrieved at the level of individual web page (%mdat hash).

QUESTION:

  • Does a similar feature (user-independent "session" data accessible to all users' requests) exist in any other web development environments/stacks, either in precisely the same form (perl web page data) or somewhat similar?

    I am specifically asking about a feature implemented/accessible as part of a web framework, not the obvious and easily done DIY solution of "well you can easily implement your own via a $backend_database_store with a key of the page URL" .

    This is a purely theoretical question borne of my trying to find non-Embperl analogue to help explain Embperl's %mdat feature. I don't care which web development stack/framework the example is from, as long as it's not something totally obscure used by 3 people in the universe :)

Background:

This came about from trying to answer a recent Embperl question about %mdat hash; I tried to explain it by comparing it to some other feature in web development. I then realized that I don't actually KNOW any other framework with a similar feature. buit I'm sure on MUST exist :)

DVK
  • 126,886
  • 32
  • 213
  • 327

1 Answers1

1

Yes, although it called "cache".

e.g. in Mason $m->cache will return your whatever object. even a %mdat if you like to.

http://www.masonhq.com/docs/manual/Devel.html#data_caching

Your "user-idependet session data", smells like cache, looks like a cache and reads like cache. Only missing some features - e.g. you can use $m->cache at every level of your application.

user571304
  • 21
  • 1
  • Hmm... I'm tempted to say "how's that different from the DIY solution?". But this is kind of hazy, since `%mdat` isn't all THAT different from a cache storing a hash keyed off of the page URL... Oh well, +1 but I can't really claim this as the accepted answer since the per-page aspect is still DIY – DVK Jan 11 '11 at 16:36