Title: Cache context based on record · Issue #930 · JSONAPI-Resources/jsonapi-resources · GitHub
Open Graph Title: Cache context based on record · Issue #930 · JSONAPI-Resources/jsonapi-resources
X Title: Cache context based on record · Issue #930 · JSONAPI-Resources/jsonapi-resources
Description: We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner. For now I'm just caching a copy for each user who sees it, but t...
Open Graph Description: We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner. For now I'm just caching...
X Description: We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner. For now I'm just...
Opengraph URL: https://github.com/JSONAPI-Resources/jsonapi-resources/issues/930
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cache context based on record","articleBody":"We allow access to certain fields on the user (email, etc.) only if `context[:current_user] == record` but this can't currently be used with caching in any reasonable manner.\r\n\r\nFor now I'm just caching a copy for each user who sees it, but that's absurd and definitely not what we need. Is there a better solution, or would it be possible to get the record inside `Resource.attribute_caching_context(context)`?","author":{"url":"https://github.com/NuckChorris","@type":"Person","name":"NuckChorris"},"datePublished":"2016-12-16T08:34:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/930/jsonapi-resources/issues/930"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b3713595-dcc4-7cd3-6f27-7b3ec09f07f0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E4A:1EFBC2:4915F:61A9C:6A525F04 |
| html-safe-nonce | 15e5a17b0bac01d8f3aac2140e76a1917c9778680e922114df6800aa3c78f522 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTRBOjFFRkJDMjo0OTE1Rjo2MUE5Qzo2QTUyNUYwNCIsInZpc2l0b3JfaWQiOiI2ODEyMDY2MTcxODk2MDk0NDY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 973f29832bcd78cb64cf9dc1dea93b5c1f006b8b19c034fd06b2c5be2345e897 |
| hovercard-subject-tag | issue:196006178 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPI-Resources/jsonapi-resources/930/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e56f54846f6c1196f3b4f1a88453ce514a47e9d101482af636db9baf2a8e22f/JSONAPI-Resources/jsonapi-resources/issues/930 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e56f54846f6c1196f3b4f1a88453ce514a47e9d101482af636db9baf2a8e22f/JSONAPI-Resources/jsonapi-resources/issues/930 |
| og:image:alt | We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner. For now I'm just caching... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NuckChorris |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/JSONAPI-Resources/jsonapi-resources git https://github.com/JSONAPI-Resources/jsonapi-resources.git |
| octolytics-dimension-user_id | 262422067 |
| octolytics-dimension-user_login | JSONAPI-Resources |
| octolytics-dimension-repository_id | 18248068 |
| octolytics-dimension-repository_nwo | JSONAPI-Resources/jsonapi-resources |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18248068 |
| octolytics-dimension-repository_network_root_nwo | JSONAPI-Resources/jsonapi-resources |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width