Closed (fixed)
Project:
JSON:API
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Nov 2018 at 16:56 UTC
Updated:
24 Dec 2018 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersI wanted to start doing this so we can fix the fact that the commit of #3014232-62: [regression] ResourceTypeRepository is significantly slower in JSON:API 2, becomes noticeable when handling hundreds of interlinked resources broke HEAD, but I don't quite understand what this issue aims to do. Hoping either of you can do this.
Comment #3
wim leersI think that once this lands, we should tag RC3, to get this bugfix (and #3014380: EntityReference base fields that are optional are not empty, but its sole item is empty, causing EntityReferenceFieldNormalizer to fail) into the hands of as many people as possible.
Comment #4
gabesulliceHere's a first pass at this (I haven't run tests really).
I agree that this makes the repository simpler which is nice. My concern is that the internal API change leaks complexity that should be internal to the class. It puts the burden of knowledge on the the caller. They must know if the resource types could be invalid as opposed to hiding that information. I think that could lead to bugs in the future.
I do not feel strongly enough about that concern to block this issue, but I did want to raise the concern in case others might feel the same way now that I've brought it up.
Comment #6
gabesulliceDerp.
Comment #8
e0ipsoI think that's totally fine for an internal API.
Comment #9
e0ipsoWe don't want to set the cache when
$resetisTRUEComment #10
gabesulliceI don't understand why we wouldn't reset the cache if it's called with
TRUE. If you're concerned that the resource types might no longer be valid, why would you let other code continue to get outdated information?Comment #11
e0ipsoThis issue argues for the introduction of a persistent cache. If so, would we still want to do this? Would we go for a chained cache?
Sorry for the noise, I didn't think we'd need persistent cache (and I still don't think that non-paragraphs data models will need it).
Let's make a decision on what to do before spending more time writing code.
#3018287: ResourceTypeRepository computes ResourceType value objects on *every request*
Comment #12
e0ipsoClosing per:

Comment #13
e0ipsoClosing per:

Comment #14
wim leersScreenshots of chats are not accessible, textual chat logs are. So adding that too :)