douling6469 2014-06-14 06:18
浏览 30

Joomla 3+奇怪的会话存储行为

As everyone knows, Joomla support different types of session handler (file, database, none, memcached etc). When users set up session handler to "none" we expect that there will be no more queries to database to handle session data.

But when you set session handler to "none", you will see that your #__session still has data and there are queries to this table on every page hit.

In /libraries/cms/application/cms.php you can see function checkSession().

/**
* Checks the user session.
*
* If the session record doesn't exist, initialise it.
* If session is new, create session variables
*
* @return  void
*
* @since   3.2
*/

In this function you can see database queries which are uses to select and insert to #__session table.

If you simple add "return;" statement site will be still full functional because of session handler setted to "none".

Why do we need this function? Why this function don't check what type of session handler do we use? Is this behavior is necessary or my solution with adding return in beginning of function is normal?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 科来模拟ARP欺骗困惑求解
    • ¥100 iOS开发关于快捷指令截屏后如何将截屏(或从截屏中提取出的文本)回传给本应用并打开指定页面
    • ¥15 unity连接Sqlserver
    • ¥15 图中这种约束条件lingo该怎么表示出来
    • ¥15 VSCode里的Prettier如何实现等式赋值后的对齐效果?
    • ¥15 流式socket文件传输答疑
    • ¥20 keepalive配置业务服务双机单活的方法。业务服务一定是要双机单活的方式
    • ¥50 关于多次提交POST数据后,无法获取到POST数据参数的问题
    • ¥15 win10,这种情况怎么办
    • ¥15 如何在配置使用Prettier的VSCode中通过Better Align插件来对齐等式?(相关搜索:格式化)