{
    "mode": "ri",
    "parameter": "ActionDispatch::Session::CookieStore",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/ri/ActionDispatch%3A%3ASession%3A%3ACookieStore/json",
    "generated": "2026-07-29T07:54:06Z",
    "sections": {
        "ActionDispatch::Session::CookieStore < ActionDispatch::Session::AbstractSecureStore": {
            "content": "(from /home/chedong/.local/share/rdoc)\n------------------------------------------------------------------------\nThis cookie-based session store is the Rails default. It is dramatically\nfaster than the alternatives.\n\nSessions typically contain at most a userid and flash message; both fit\nwithin the 4096 bytes cookie size limit. A CookieOverflow exception is\nraised if you attempt to store more than 4096 bytes of data.\n\nThe cookie jar used for storage is automatically configured to be the\nbest possible option given your application's configuration.\n\nYour cookies will be encrypted using your apps secretkeybase. This\ngoes a step further than signed cookies in that encrypted cookies cannot\nbe altered or read by users. This is the default starting in Rails 4.\n\nConfigure your session store in an initializer:\n\nRails.application.config.sessionstore :cookiestore, key: 'yourappsession'\n\nIn the development and test environments your application's secret key\nbase is generated by Rails and stored in a temporary file in\ntmp/developmentsecret.txt. In all other environments, it is stored\nencrypted in the config/credentials.yml.enc file.\n\nIf your application was not updated to Rails 5.2 defaults, the\nsecretkeybase will be found in the old config/secrets.yml file.\n\nNote that changing your secretkeybase will invalidate all existing\nsession. Additionally, you should take care to make sure you are not\nrelying on the ability to decode signed cookies generated by your app in\nexternal applications or JavaScript before changing it.\n\nBecause CookieStore extends Rack::Session::Abstract::Persisted, many of\nthe options described there can be used to customize the session cookie\nthat is generated. For example:\n\nRails.application.config.sessionstore :cookiestore, expireafter: 14.days\n\nwould set the session cookie to expire automatically 14 days after\ncreation. Other useful options include :key, :secure and :httponly.\n------------------------------------------------------------------------",
            "subsections": []
        },
        "Class methods:": {
            "content": "new\n",
            "subsections": []
        },
        "Instance methods:": {
            "content": "deletesession\nloadsession\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}