Log message #4182085

# At Username Text
# Apr 4th 2019, 13:32 neon1024 Then I would need a View class for each controller method.
# Apr 4th 2019, 13:32 ricksaccous i dunno, there's prob a way to get the request in view class or something
# Apr 4th 2019, 13:32 ricksaccous set the view class in the controller instead? lol
# Apr 4th 2019, 13:31 neon1024 When creating a custom View class, how do I know the controller action? So I can properly switch between templates?
# Apr 4th 2019, 13:29 val @admad Hmmm... That's pretty close but the query would not be persisted between requests. Is there a way to do something like `if not in array engine then get from memcached else get from database`?
# Apr 4th 2019, 13:17 admad you can create cache config which use `ArrayEngine` which would be in memory
# Apr 4th 2019, 13:16 val Or do I get it wrong?
# Apr 4th 2019, 13:16 val @admad if I understood correctly that uses cache config, f.ex. memcached. In-memory-caching with `cacheQueries` in cake 2.x allows to minimize the number of hits to memcached.
# Apr 4th 2019, 13:14 admad that allows you pretty much the same what you described
# Apr 4th 2019, 13:14 admad @val https://book.cakephp.org/3.0/en/orm/query-builder.html#caching-query-results
# Apr 4th 2019, 13:13 weto.jc @rochasmarcelo the connection works this way with pure php```$db = new mysqli("meubanco", "admin", "123456", "DATABASE_NAME");```
# Apr 4th 2019, 13:10 admad the right person to have this conversation with would be @lorenzo
# Apr 4th 2019, 13:09 val @admad I think technically the final SQL is not really needed for in-memory-caching. The prepared statement and the query params could be json encoded, merged and md5'ed in order to generate the cache key.
# Apr 4th 2019, 13:02 ricksaccous interesting
# Apr 4th 2019, 13:02 admad before have you just have placeholders in the query
# Apr 4th 2019, 13:01 admad @val with pdo prepared statements you can't have the final SQL until query is actually executed
# Apr 4th 2019, 13:00 ricksaccous you have a cache method now but you have to feed it some params
# Apr 4th 2019, 12:57 val @admad is there a good reason why `cacheQueries` property was removed?
# Apr 4th 2019, 12:57 weto.jc @rochasmarcelo changing to 'mysql' the host has the following error: ```{"code":"500","url":"ROUTE_URL","name":"Database connection andquot;SQLSTATE[HY000] [1044] Access denied for user and#039;adminand#039;@and#039;%and#039; to database and#039;DATABASE_NAMEand#039;andquot; is missing, or could not be created."}```
# Apr 4th 2019, 12:49 rochasmarcelo @weto.jc host is the service name, normally 'mysql'
# Apr 4th 2019, 12:45 admad sunny: you sure can
# Apr 4th 2019, 12:44 admad @val there isn't any
# Apr 4th 2019, 12:24 weto.jc version php 5.x
# Apr 4th 2019, 12:09 weto.jc ``` ```'host' => 'meubanco',links: - meubanco:mysql``` and 'login' => 'admin', 'password' => '123456',```
# Apr 4th 2019, 12:01 weto.jc Hi everyone, I'm creating a docker development environment for a legacy cackephp application (version 2.x), but I'm having trouble connecting to the database that is another container. When I connect to mysqli it works but when I connect through database.php it is giving the following error: How do I report the data in database.php?
# Apr 4th 2019, 11:38 sunny hi
# Apr 4th 2019, 11:34 sunny where i will store pem files
# Apr 4th 2019, 11:33 sunny can i have a private folder outside webroot?
# Apr 4th 2019, 11:33 sunny hi
# Apr 4th 2019, 11:20 val Hi, what is the equivalent of 2.x `$this->MyModel->cacheQueries = true;` in 3.x?
# Apr 4th 2019, 10:57 neon1024 Breaks the S in SOLID
# Apr 4th 2019, 10:57 neon1024 The thing which puts me off Entity methods is that an entity shouldn’t know how it’s data is displayed
# Apr 4th 2019, 10:56 neon1024 Fractal was nice, but didn’t allow us to match our existing web service response format :(
# Apr 4th 2019, 10:56 neon1024 So it’s kinda data and view
# Apr 4th 2019, 10:56 neon1024 I’m undecided because it’s data manipulation, but only for JSON response
# Apr 4th 2019, 10:55 neon1024 Didn’t look into it
# Apr 4th 2019, 10:54 dereuromark why not using my dtos then?^^
# Apr 4th 2019, 10:53 neon1024 I think new classes would be cleaner
# Apr 4th 2019, 10:52 neon1024 I’m looking to mimic the functionality of Fractal, and I can’t decide if I should make my transformers their own class, implementing an interface, or if they should be entity mutation methods
# Apr 4th 2019, 08:17 neon1024 Morning all :wave:
# Apr 4th 2019, 07:26 patox44 1 problem. I have numbers. How can I make array with keys?