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 :)

4

1 回答 1

1

是的,虽然它叫做“缓存”。

例如,在 Mason $m->cache 中将返回您的任何对象。如果您愿意,甚至可以使用 %mdat。

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

您的“用户 idependet 会话数据”闻起来像缓存,看起来像缓存,读起来像缓存。只是缺少一些功能——例如,您可以在应用程序的每个级别使用 $m->cache。

于 2011-01-11T14:24:02.967 回答