Posts

Showing posts with the label caching

Is there any other way to get Laravel to reload env variables?

Is there any other way to get Laravel to reload env variables? I have a shared hosting account on a well known host. I have my Laravel site uploaded and functioning for the most part. But I had to make an env change. Now I can't get Laravel to see the change. I know this is common issue. I have tried running the artisan commands to clear config and cache (php artisan config:cache & php artisan cache:clear ) but this fails with an error: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home4/cmatthewc/cvbaptistapp/artisan on line 33 Is there any other way to get Laravel to refresh its cache from env? TY in advance... what version of laravel? Also, thats a PHP error in the artisan file, did you modify it? – Derek Jun 29 at 18:11 ...

Heroku caching api responses [django/restframework]

Heroku caching api responses [django/restframework] Heroku seams to be caching api responses from my Django/RestFramework app. I have no caching mechanism enabled on restframework. Looking at the logs, I can see a error response (400) caused by a object not found, and, right before, the python stacktrace. Then I populate the object table and here happens the issue. On next requests, que error doesn't happen anymore, but the response is exactly the same 400 as before! Eventually, I get alternate 200/400 responses. Edit 1: When I get 400 response, it's not just the code, but also the body. My code throws no error, but the response is code 400 and the first error message. Edit 2: Added bellow my view and my serializer, with not relevant parts ommited The log with error: 2018-06-29T11:34:45.991094+00:00 app[web.1]: INFO 2018-06-29 08:34:45,990 dados: 1 [1/1] 6.34 Kb AGUARDANDO: importação síncrona iniciada 2018-06-29T11:34:46.044547+00:00 app[web.1]: UF Destino AC 2018-06-29T11:3...

How to disable Hybris cache?

How to disable Hybris cache? In develop mode, I would like to disable the Hybris cache regions (at least the query region). I found no property for this in the project.properties and any information in the Hybris official website. Did you try min cache size? – mkysoft May 17 '17 at 10:50 3 Answers 3 By default Hybris use Region Cache. You can disable Region cache but then Hybris will use the previous cache solution. local.properties cache.legacymode=true It is recommended to use the Hybris Region Cache. That is why after switching to the previous cache solution you can expect some warning messages displayed in the console logs and in the Hybris Administration Console on Cache page. OR You can try changing its size to Zero but i am not sure. Default V...

When is it not possible to exploit spatial locality in cache?

When is it not possible to exploit spatial locality in cache? We are given a processor whose instructions operate on 8 - byte operands and whose instructions are also encoded using 8 bytes. We are using a 16 kilo-byte, 4-way set associative cache that contains 1024 sets. The cache has 4 * 1024 = 4096 cache lines in total. That means, each cache line is 16KB=4096 = 4 bytes, so each operand and each instruction needs to be stored in two cache lines, which will require 2 accesses to the cache for each load/store operation and instruction fetches. We are told that the cache cannot apply spatial locality, but why? What does spatial locality mean in this context? 1 Answer 1 So your machine doesn't have single byte loads/stores at all? If every load is a full cache line (or multiple whole cache lines), then bringing a line into cache for one load will never benefit another load that's spatially nea...