0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Cached member data in ghost-members-ssr-cache cookie (#11096)

no-issue

* Installed @tryghost/members-ssr@0.4.0
  This now supports caching of the data returned by the members-api

* Renamed cookies set by members-ssr
  As discussed with @ErisDS I have prefixed these cookies with `ghost`
This commit is contained in:
Fabien O'Carroll 2019-09-09 17:39:46 +08:00 committed by GitHub
parent 9447165e0a
commit b8fc0d2bd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -42,6 +42,8 @@ const membersService = {
ssr: MembersSSR({ ssr: MembersSSR({
cookieSecure: urlUtils.isSSL(urlUtils.getSiteUrl()), cookieSecure: urlUtils.isSSL(urlUtils.getSiteUrl()),
cookieKeys: [settingsCache.get('theme_session_secret')], cookieKeys: [settingsCache.get('theme_session_secret')],
cookieName: 'ghost-members-ssr',
cookieCacheName: 'ghost-members-ssr-cache',
// This is passed as a function so that updates to the instance // This is passed as a function so that updates to the instance
// are picked up in the ssr module // are picked up in the ssr module
membersApi: () => membersApi membersApi: () => membersApi

View file

@ -42,7 +42,7 @@
"@nexes/nql": "0.3.0", "@nexes/nql": "0.3.0",
"@tryghost/helpers": "1.1.9", "@tryghost/helpers": "1.1.9",
"@tryghost/members-api": "0.5.0", "@tryghost/members-api": "0.5.0",
"@tryghost/members-ssr": "0.3.1", "@tryghost/members-ssr": "0.4.0",
"@tryghost/social-urls": "0.1.2", "@tryghost/social-urls": "0.1.2",
"@tryghost/string": "^0.1.3", "@tryghost/string": "^0.1.3",
"@tryghost/url-utils": "0.3.1", "@tryghost/url-utils": "0.3.1",

View file

@ -210,10 +210,10 @@
node-jose "^1.1.3" node-jose "^1.1.3"
stripe "^7.4.0" stripe "^7.4.0"
"@tryghost/members-ssr@0.3.1": "@tryghost/members-ssr@0.4.0":
version "0.3.1" version "0.4.0"
resolved "https://registry.yarnpkg.com/@tryghost/members-ssr/-/members-ssr-0.3.1.tgz#08f80ba1a17196f57db41b360b6b5ddf31582b0f" resolved "https://registry.yarnpkg.com/@tryghost/members-ssr/-/members-ssr-0.4.0.tgz#6efe4a2111b7aca6f502ba3ac29765285ab05665"
integrity sha512-Exs3Kxv10lYqVWYMIyEp4htPCFoNdGRqg82cOrNdgkYwZYxo5nevMikuWKhQpgoEafqhjEeWZ1awCeUxji5sGw== integrity sha512-XbBZ3gvQwlThRzqnyUHiRcKgfq+n1W21g3Ma3XaapHJdgRGVNLfGczOtiecvjLvnHVB95lkY09Lqlc/Cc5GVHQ==
dependencies: dependencies:
bluebird "^3.5.3" bluebird "^3.5.3"
concat-stream "^2.0.0" concat-stream "^2.0.0"