doufen3091 2015-08-24 23:45
浏览 52
已采纳

需要刷新的Magento会话文件存储

I've moved stores to a new server that doesn't support memcache, I've fallen back to writing to the file system. When a user is visiting for the first time and puts an item in the cart nothing happens, it redirects them to the cart page which states no items added.

Next time the user tries adding a product into the cart it will be visible but sometimes needing a refresh in order to see it. Same happens with removing an item from the cart, mini cart does reflect in real time. Seems like an issue with the write process not completing before being read?

The var/sessions folder has 0777 for the purpose of testing.

Is this a common issue?

Have the following for file storage

<session_save><![CDATA[files]]></session_save>
<session_cache_limiter><![CDATA[]]></session_cache_limiter>

When previously using memcache it looked like

<session_save><![CDATA[memcache]]></session_save>
<session_save_path><![CDATA[unix:///var/tmp/memcached.sess.newdomain.co.nz_sessions.sock?persistent=1&weight=2&timeout=10&retry_interval=10]]></session_save_path>
<session_cache_limiter><![CDATA[]]></session_cache_limiter>
  • 写回答

2条回答 默认 最新

  • dongyang1518 2015-08-27 23:00
    关注

    So after debugging every single cache possible it actually turned out to be browser caching the site, this was happening for everybody that visited the site, why I still have no idea.

    I added the following in .htaccess which seems to have resolved the issue

    <FilesMatch "\.(html|htm|js|css|php)>
        FileETag None
        Header unset ETag
        Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
        Header set Pragma "no-cache"
        Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
    </FilesMatch>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码