Jump to content
thirty bees forum

wakabayashi

Silver member
  • Posts

    2,004
  • Joined

  • Last visited

  • Days Won

    165

wakabayashi last won the day on December 4

wakabayashi had the most liked content!

5 Followers

About wakabayashi

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

wakabayashi's Achievements

  1. I believe it's not possible to fill the APCu cache by a cronjob. This is a big drawback in my use case. I am trying to use redis now. Doesn't seem to be much more complex 😏
  2. I could solve it. In Plesk there are multiple settings. Some of them are globally on the server and some per domain. I had to adjust it in global settings 🥵
  3. I am working a lot with cronjobs, to not slow down my website when calling heavy processes. While this works solid, it's also getting a bit messy and I see that the core offers an ultra professional way of handling jobs. 😲 But there is not much documentation. @datakick Can you give me a short overview, how this is working and what be the simplest implentation to start with? This is, what I believe at the moment: I need to implement WorkQueueTaskCallable with one function execute(). When such a task is executed, an entry is saved to table 'ps_workqueue_task'. When I want to such a task to be executed I need to call createTask() There are schedulded tasks in addition, that trigger the WorkQueueTaskCallable in a certain frequency. Probably I have to implement InitializationCallback for that. If a scheduld task was startet it's saved to 'ps_schedulded_task_execution' table Not sure, if this is correct and probably there is much more. What I wonder: What does actually execute the whole process? Do I need only one cronjob, that somehow fires the schedulded task? Is the TriggerController doing this from time to time as well? But why so? Multiple cronjobs can to things parallel (at least, this is what I believe). Is this working queue the same or will one job be executed after the other? Let's say the packs quantity is updating some products, can I update on the same time currencies with a task (random example). My goal is to cache more resources. That for I need a clever way to rebuild the cache. Do only the minimum on the fly the rest should be handled behind. For example I wan't to cache the reviews of product/category pages. When someone posts a new product review, I need to rebuild multiple caches. This working queue system should be ideal for jobs like this, right?
  4. No, I was below 32M. My initial setup was: apc.shm_segments=1 apc.shm_size=512M Then I tried also with apc.shm_segments=3. But I am not totally sure, what it means. Does it mean 3x 512M or does it mean I have three "segments" with 512M/3? If I understand you right, I should just let the cache be filled and see what happens when I reach 32M right? Cause the 32M are the default value.
  5. I really like to work with APCu. But I noticed today, that already 20% of my cache was filled. Then I noted, that the system only uses 32M instead of my defined apc.shm_size=512M. Any idea, what could be the reason? I already tried to restart php and nginx server (that's why the full 32M are now available).
  6. Thanks a lot! @the.rampage.rado and @datakick. The topic "cache" is still puzzling me, but the longer I think about, the more sense it makes. Your answers helped me a lot to understand. Raising the following questions to myself, helped as well: how would the system know, that this content is always the same for each customer? how would it know, if the the content is the same for logged in, but differs for not logged in? how would it know that it's always the same content, after some actions by visitor or merchant in BO? You can ask hundreds such questions and the system just can't know the answer 🥴 So yeah, to make this cache globally would be a disaster. 😅 And now I also understand, why the full page cache was introduced. It makes a lot of sense in theory. But in pratice, it's kind of impossible for a merchant to set it up correctly. In general module devs should handle it. Good to know, that there is still a lot of room for improvements on my side 👍 I just learnt that in smarty we can use something like: {include 'sub_template.tpl' caching} Probably useful, if you include always the same content 🫠
  7. @datakick shouldn't the method Tools::enableCache() be called somewhere? I am not sure, if this is done correctly. echo $this->context->smarty->caching_type.'<br>'; echo (int)$this->context->smarty->caching.'<br>'; // returns ssc 0 I am pretty sure, that it's broken somehow. It doesn't even have todo with ssc. The file cache was the same. Now I just called myself Tools::enableCache(). And Tada: the array is filled with lots of tpl stuff 😅 👍 Edit: or is my understanding completly wrong and $this->isCached() needs to be called, so that any cache is happening? Cause I see modules calling it, but the core doesn't really. @the.rampage.rado how does your array looks like? Is there only module stuff inside or also theme stuff?
  8. Sure. I thought it must be my configuration, but I did a simple test: $query = new \DbQuery(); $query->select('*'); $query->from('product'); $query->limit(500); $result = \Db::getInstance()->ExecuteS($query); $cache = Cache::getInstance(); $cache->set('GENZO_TEST', $result, 6000); This is is now in the cache array. So the caching seems to work. I don't use multistore anymore. The Configuration Values seem to be correct. I haven't installed the module @the.rampage.rado has mentioned... I will make some further tests.
  9. I am playing around with APCu Cache in combo with smarty. How do I know, if it's working correctly? print_r(apcu_cache_info()); // it returns: Array ( [num_slots] => 4099 [ttl] => 0 [num_hits] => 0 [num_misses] => 0 [num_inserts] => 0 [num_entries] => 0 [expunges] => 0 [start_time] => 1733873009 [mem_size] => 0 [memory_type] => mmap [cache_list] => Array ( ) [deleted_list] => Array ( ) [slot_distribution] => Array ( ) ) This looks somehow wrong to me!? What does it mean in practice? Just using $smarty->fetch() is correct, right?
  10. To not confuse others: this I just my fear in mind. I never have seen it here too. I just wanted to know from somebody that use it for a long time 👍 Thanks for the Litespeed tipp. I will look into this too 😎 Edit: Do you use nginx? Cause I am right now, not sure if it make sense to use Litespeed and nginx together :S
  11. Are you still using APCu? As this caching topic is very complex, I would like to know your experience with it!? Are there any cases, when visitors see "old" content? Example: You change a price or description in BO and the visitor sees the old stuff in FO for some time. That is basically my main fear with caches 🫣
  12. No, it's just for BO. I need to check the delivery address. It's a good hint if the person is trustful, if data are correct and if we have already delivered in the near place...
  13. Nevermind. I opened an Account at Wise and even, if it's a prepaid card as well. This one got accepted 😅 🤦‍♂️
  14. I am still using google maps, or I should say: I still want to use it. My problem is, that google forces me to use a google cloud account with billing information. While I have that, it doesn't accept my payment method anymore. It's very stupid as I have prepaid credit cards, which can't be used. Even more stupid is the fact, that I never had to pay anything as Google Maps is free. That's why I wanted to ask if someone is also using free Google Maps and could share an API Key with me? 😬
  15. I am still confused about this BO Login request. You are afraid of brutforce attacks, right? But is it a real/do you see attacks? Cause in my case I never noticed such trials. I can look into it, but datakick said it would need some override, so I am not sure, if I am going to implement it.
×
×
  • Create New...