# |
Apr 19th 2017, 13:50 |
greitas |
hi. |
# |
Apr 19th 2017, 13:50 |
crazycoder |
hmic, thanks! |
# |
Apr 19th 2017, 13:49 |
crazycoder |
ok |
# |
Apr 19th 2017, 13:49 |
crazycoder |
awesome |
# |
Apr 19th 2017, 13:49 |
hmic |
so add it to the _hidden property and you are all good |
# |
Apr 19th 2017, 13:48 |
hmic |
check out the current implementations in the Datasource/EntityTrait, if thats the way you want/need to go |
# |
Apr 19th 2017, 13:48 |
crazycoder |
i only use it inside my controller when i have to do other jobs like saving etc |
# |
Apr 19th 2017, 13:48 |
crazycoder |
hmic, nono for json responses i do not want it |
# |
Apr 19th 2017, 13:47 |
hmic |
if you want it serialized by condition, you can overwrite the corresponding toArray() and jsonSerialize() functions in the entity to respect some custom information to decide to include the _joinData in the serialized data |
# |
Apr 19th 2017, 13:47 |
hmic |
as long as you are working with the entity, the hidden properties has no effect at all |
# |
Apr 19th 2017, 13:47 |
hmic |
it does only affect the serialized data! |
# |
Apr 19th 2017, 13:46 |
crazycoder |
i mean...if i not use $this->loadComponent('RequestHandler'); <-- does it affect other code? |
# |
Apr 19th 2017, 13:46 |
crazycoder |
does it not affect the other code? |
# |
Apr 19th 2017, 13:46 |
hmic |
as long as you do not use the serialized data, you will be fine |
# |
Apr 19th 2017, 13:46 |
crazycoder |
yes right now i am building an API so the response is in json |
# |
Apr 19th 2017, 13:45 |
crazycoder |
another component |
# |
Apr 19th 2017, 13:45 |
crazycoder |
hmic, i use it from a component |
# |
Apr 19th 2017, 13:43 |
hmic |
so your application code can use the data still. thats the whole idea |
# |
Apr 19th 2017, 13:43 |
hmic |
the hidden property is only used when serializing it |
# |
Apr 19th 2017, 13:43 |
hmic |
where do you use it? |
# |
Apr 19th 2017, 13:43 |
crazycoder |
so i cannot change it "globally" |
# |
Apr 19th 2017, 13:43 |
crazycoder |
hmic, yes i did it but sometimes i used it |
# |
Apr 19th 2017, 13:41 |
hmic |
crazycoder, why not just add _joinData to the _hidden property of the respective entity? |
# |
Apr 19th 2017, 13:41 |
inoas |
right? |
# |
Apr 19th 2017, 13:41 |
inoas |
writing a path as a key should be okay |
# |
Apr 19th 2017, 13:38 |
inoas |
not links ... humpf |
# |
Apr 19th 2017, 13:38 |
inoas |
but that's for redirects only anyway... |
# |
Apr 19th 2017, 13:38 |
inoas |
but as far as I know there is not |
# |
Apr 19th 2017, 13:38 |
inoas |
hmic I would have prefered if there was a way to use <include> in .htaccess ;p |
# |
Apr 19th 2017, 13:37 |
crazycoder |
https://gist.github.com/anonymous/3f55105fe22a4db8dd017285d140f383 <--- for this |
# |
Apr 19th 2017, 13:37 |
crazycoder |
hmic, do you know if there is an alternative? |
# |
Apr 19th 2017, 13:37 |
dereuromark |
and then you have time to figure out how to warm up specific updated users and you got the perfect world :slightly_smiling_face: |
# |
Apr 19th 2017, 13:37 |
hmic |
if thats what your routes work like... but no, they dont (hopefully) |
# |
Apr 19th 2017, 13:37 |
dereuromark |
prefix the cache with sth that identifies him, this way you can invalidate only a part of the cache that needs updating |
# |
Apr 19th 2017, 13:37 |
inoas |
"sounds reasonable" ;-) |
# |
Apr 19th 2017, 13:36 |
inoas |
all caching breaks down ;p |
# |
Apr 19th 2017, 13:36 |
inoas |
so every time some dude saves a document revision |
# |
Apr 19th 2017, 13:36 |
inoas |
haha |
# |
Apr 19th 2017, 13:36 |
hmic |
i'd just purge it for now :p |
# |
Apr 19th 2017, 13:36 |
hmic |
you could do that, sure |
# |
Apr 19th 2017, 13:36 |
hmic |
cahing is easy, invalidating a cache is hard |