# |
Jul 13th 2018, 13:43 |
josbeir |
public function setConfig($key, $value = null, $merge = true) |
# |
Jul 13th 2018, 13:42 |
josbeir |
try to pass that as false |
# |
Jul 13th 2018, 13:42 |
josbeir |
'merge' |
# |
Jul 13th 2018, 13:42 |
josbeir |
setConfig has a second argument i think |
# |
Jul 13th 2018, 13:24 |
ricksaccous |
(I'm trying to use mine instead of FormAuthenticate) |
# |
Jul 13th 2018, 13:23 |
ricksaccous |
how do i remove Authenticators I am not intersted in using? |
# |
Jul 13th 2018, 13:23 |
ricksaccous |
this is problematic for me |
# |
Jul 13th 2018, 13:23 |
ricksaccous |
when I do $this->Auth->setConfig('authenticate', [whatever]) it never removes, only appends |
# |
Jul 13th 2018, 12:46 |
josbeir |
but there are probably use cases :slightly_smiling_face: |
# |
Jul 13th 2018, 12:46 |
josbeir |
i would do a route class or smthing and pull that info from the db on request |
# |
Jul 13th 2018, 12:45 |
josbeir |
and damn, i could't imagine 5000 actual existing routes |
# |
Jul 13th 2018, 12:45 |
admad |
Then IMO this is an optimization that shouldn't be enabled by default |
# |
Jul 13th 2018, 12:45 |
josbeir |
indeed |
# |
Jul 13th 2018, 12:44 |
admad |
Practically no benefit for 50 routes. |
# |
Jul 13th 2018, 12:36 |
josbeir |
still, thousand connected rotues.. damn |
# |
Jul 13th 2018, 12:35 |
josbeir |
oh, thats relevant enough :slightly_smiling_face: |
# |
Jul 13th 2018, 12:33 |
steinkel |
benchmarks here > https://github.com/cakephp/cakephp/pull/11765#issuecomment-371139620 |
# |
Jul 13th 2018, 12:30 |
josbeir |
i'll give that a go, tnx |
# |
Jul 13th 2018, 12:29 |
steinkel |
yep |
# |
Jul 13th 2018, 12:29 |
josbeir |
:heavy_check_mark: |
# |
Jul 13th 2018, 12:29 |
josbeir |
ok, so extend the aws class and implement sleep |
# |
Jul 13th 2018, 12:29 |
steinkel |
it's just a way to bypass the exception |
# |
Jul 13th 2018, 12:29 |
steinkel |
but you are not actually using that for anything else |
# |
Jul 13th 2018, 12:29 |
josbeir |
doh |
# |
Jul 13th 2018, 12:29 |
josbeir |
ah right |
# |
Jul 13th 2018, 12:29 |
steinkel |
sleep is called on serialization |
# |
Jul 13th 2018, 12:29 |
josbeir |
so how does that impact __sleep ? |
# |
Jul 13th 2018, 12:28 |
josbeir |
indeed |
# |
Jul 13th 2018, 12:28 |
steinkel |
AwsClient throws an exception by default on serialize |
# |
Jul 13th 2018, 12:28 |
josbeir |
hmm weird aproach |
# |
Jul 13th 2018, 12:28 |
steinkel |
@josbeir I fixed the issue extending the class and overriding `__sleep()` |
# |
Jul 13th 2018, 12:27 |
steinkel |
I did some benchmarks |
# |
Jul 13th 2018, 12:24 |
josbeir |
+1 for that, i'm guessing performance impact on routes is only relevant if you have many many routes defined |
# |
Jul 13th 2018, 12:23 |
admad |
and perhaps have it disabled by default |
# |
Jul 13th 2018, 12:23 |
admad |
the comment https://github.com/cakephp/app/blob/master/src/Application.php#L76 should be expanded to mention the potential problems routes caching can cause |
# |
Jul 13th 2018, 12:22 |
josbeir |
tnx |
# |
Jul 13th 2018, 12:22 |
josbeir |
nah your class works fine tbh, i was just thinking about on how to handle the issue |
# |
Jul 13th 2018, 12:22 |
steinkel |
let me check ... |
# |
Jul 13th 2018, 12:22 |
steinkel |
actually @josbeir I remember a similar issue |
# |
Jul 13th 2018, 12:22 |
josbeir |
it doesn't allow serialization and throws an exception about it |
# |
Jul 13th 2018, 12:22 |
admad |
@josbeir if someone wants to make a PR for it sure, currently I am not interested in spending time mitigating problems cause by core defaults :slightly_smiling_face: |