63 Topics

Member Avatar for
Member Avatar for emmanuelkatto

Hi everyone, I am Emmanuel Katto. I'm building a high-traffic web application that requires fast and efficient data retrieval from a relational database. To improve performance, I'm considering implementing a caching layer using Redis. But, I'm not sure about the best approach to design and integrate the caching layer into …

Member Avatar for Dani
0
17
Member Avatar for borobhaisab

Hello There, Do you have any experience how to run a dns cache ? I want to learn how to run a dns cache and log what my users are browsing onto a webpage. In other words, the Log File should turn into a webpage be it with .html or …

Member Avatar for borobhaisab
0
18
Member Avatar for estherschindler

I’m working on a blog post about this topic. I’d love to hear your suggestions! * What book(s) should someone read to come up to speed? * Why do you recommend that one? Note that the books don’t have to be peculiar to Redis. For example, someone suggested *Designing Data-Intensive …

Member Avatar for Vandiun
0
318
Member Avatar for Dani

When I run `getStats()` on my PHP instance, it results in the following: array ( '10.143.27.235:11211' => array ( '����' => '', 'pid' => 3602, 'uptime' => 49804, 'time' => 1663088274, 'version' => '1.5.22', 'libevent' => '2.1.8-stable', 'pointer_size' => 64, 'rusage_user' => 30.254434, 'rusage_system' => 62.188442000000002, 'max_connections' => 4096, 'curr_connections' …

Member Avatar for Dani
1
62
Member Avatar for Dani

I'm trying to get Memcached persistent connections to work. We currently have a cluster of four Memcached servers each with 2GB of RAM, and four web servers. My code looks like this: public function __construct() { global $config; $this->cache = new Memcached('daniweb'); if ($this->cache->isPristine()) { $this->cache->setOptions(array( Memcached::OPT_NO_BLOCK => true, Memcached::OPT_BUFFER_WRITES …

Member Avatar for Dani
0
1K
Member Avatar for Dani

Here is the function that I use here at DaniWeb to manage flood control. It keeps track of how often a specific user or IP address is making a request, and increments a counter. If there have been no requests after 5 minutes, the counter resets to 0. It returns …

Member Avatar for Dani
4
457
Member Avatar for Dani

This question specifically relates to PHP's Memcached library when specifying a server key and adding multiple keys at once. **Question one**: Is it true that PHP's setMultiByKey() doesn't take advantage of the memcached server's native support for setting multiple keys at once, but that the logic is on PHP's side …

0
269
Member Avatar for Dani

Our CSS and JS files are not being re-downloaded by web browsers when we update them. The response headers look like this: cache-control: max-age=7776000 content-encoding: gzip content-type: text/css; charset=UTF-8 date: Sat, 01 Feb 2020 02:41:59 GMT etag: W/"5e34c19d-68a08" expires: Fri, 01 May 2020 02:41:59 GMT last-modified: Sat, 01 Feb 2020 …

0
921
Member Avatar for syria718

<?php include 'ProcessDAO.php'; $dest=""; if(isset($_POST['login'])){ session_start(); // i get an error in this line !! $_SESSION['status']='online'; $_SESSION['breadcrumb']='home'; $pro = new ProcessDAO(); $dest = $pro->LogIn($_POST['username'],$_POST['password']); }else{ session_start(); $dest ="Location: ../index.php"; session_destroy(); } header($dest); ?> guyss can you help me out because in my Login.PHP file when i login i always get …

Member Avatar for Dani
0
8K
Member Avatar for Dani

I'm getting ` Session: Error while trying to free lock for ci_session` show up in the error log a couple times a minute, sometimes, and every 15 minutes other times. Using Redis for sessions. It's not happening on a different server that has almost the same code base and is …

Member Avatar for Dani
0
4K
Member Avatar for jkon

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 …

Member Avatar for Trasser
1
2K
Member Avatar for davy_yg

Hello, I have a website that I built after editing it requires the user to clear browser cache to see the updated website. My question is does it requires everyone who have open the website for the first to clear browser cache to see the updated? What if the first …

Member Avatar for KushMishra
0
247
Member Avatar for SimonIoa

Hello, i want to cache embedded urls -YouTube, Vimeo- photos and videos so that i could reduce bandwidth usage and server load for my website. How can i help my website to do that? I know that browsers cache information `https://en.wikipedia.org/wiki/Web_cache`. Is there something i can to do to make …

Member Avatar for cereal
0
371
Member Avatar for Saqlainz

Cache in local storage of browsers gets cleared when website page redirects from AliPay payment website. This is happening in some computers and working fine in some. From my website user selects AliPay payment method then user is redirected to payment website and on successful payment is being redirected back …

Member Avatar for rproffitt
0
496
Member Avatar for Dani

Dazah API uses Redis to handle rate limiting. The goal is to limit every each client_id/user_id pair from making over 5,000 requests every 5 minutes. We use Codeigniter 3.x and it looks something like this: $flood_control = $CI->cache->get("user_limit:{$token_obj->client_id}:{$token_obj->user_id}"); if ($flood_control === false) { $CI->cache->save("user_limit:{$token_obj->client_id}:{$token_obj->user_id}", 0, 300); } else if ($flood_control …

Member Avatar for cereal
0
765
Member Avatar for developer707

Hello, Recently I am dealing with bad performance in an php application that I have build, googling this issue I found out that using services like memcached you can archive a huge performance improvements. The weird thing comes when I try to find a very good and detailed example I …

Member Avatar for Dani
0
645
Member Avatar for gentlemedia

I've noticed the last couple of weeks that a hard-refresh won't clear the cache anymore in Chrome... well to me and two clients of mine (we're all on a Mac by the way). Not sure either if there was an update to Chrome recently which might cause this now. Did …

Member Avatar for rproffitt
0
572
Member Avatar for Tinnin

Hi All, I'm trying to set up an application cache for offline viewing. I'm using a custom built mvc framework. I'm having trouble getting anything to work regarding the application cache. It's as though the .appcache file isn't even being picked up. My set up is as follows: referencing the …

0
197
Member Avatar for Mike Askew

Hi All We are having an issue where a WSDL is loading another WSDL into it when we call it. This call takes a while on the first call which normally causes failures across the application during testing. One option we are looking into is pre-caching the WSDL in IIS …

1
304
Member Avatar for mike_2000_17

This tutorial is the first time I write about coding techniques for improving the performance of software. This is going to be a step-by-step journey through a real example, with real benchmark results at every step so that you can see the effect of the different optimization techniques. And as …

Member Avatar for NathanOliver
7
2K
Member Avatar for KnifeDarky

Hello, so I'm completely re-designing and updating files on the website, but the problem is, that everytime I change e.g. index.html file the website stays the same. I think that it has something to do with the browser's cache. It happens more often on Firefox, but I just hit ctrl+f5 …

Member Avatar for KnifeDarky
0
253
Member Avatar for mattster

Hi All, I am working with a Magento (v1.8.1) site, which until a week or so ago, was working perfectly. I am using the SM_AMAZ theme, and have no plugins which could interfeare with performance. Everything will be fine, then something in the admin panel will get changed, and the …

Member Avatar for imti321
0
387
Member Avatar for coder123

Dear experts I am running one mysql query which contains selection from multiple tables.The problem is sometimes the query runs very slow, but sometimes it is ok.Acctually when i run it first time it is very very slow, and from the next time it becomes fast.I wonder if it is …

Member Avatar for janissantony
0
384
Member Avatar for sidfarkus

I using Phpredis and am trying to get information from the following key called "statHistory" I am new to redis and not sure how to call each value individually. I am able to connect to redis using php and have tested it using the ping command. It has been two …

Member Avatar for diafol
0
304
Member Avatar for aravind326

Hi, I have a java class that is being used by multiple people (from a UI). In the class i have a static HashMap with the userKey as the map key and an arraylist with data pertaining to the user as the value. I am using this kind of like …

Member Avatar for aravind326
0
388
Member Avatar for vick4523zf

Hye, I have started to read and implement Cache Oblivious Btree on RAM. Starting with the Weight Balanced BTree by Arge and Vitter. The Deletion algorithm explained says that after deletion of a leaf an ancestor will get unbalanced so to merge the ancestor with neighbor and split if the …

Member Avatar for vick4523zf
0
314
Member Avatar for Dani

This seems kinda random but basically I have the following member function in my caching class: public function increment($key, $expires = 0) { // Requires OPT_BINARY_PROTOCOL return $this->cache->increment($key, 1, 0, $expires); } So then I want to do flood protection like this: $cache->increment('foo', 10) > 50 90% of the time …

Member Avatar for LastMitch
0
428
Member Avatar for james.lu.75491856

def mu_cache(func,maxsize=128): "Most Used Cache decorator" cname = "__"+func.__name__+"_Cache" rname = "__"+func.__name__+"_Rankings" exec("global "+cname) exec(cname+" = {}") #here exec("global "+rname) exec(rname+" = {}") def wrap(*args,**kwargs): cache = eval(cname) rankings = eval(rname) try: res = cache[(args,kwargs)] except: res = func(*args,**kwargs) cache[(args,kwargs)] = res else: try: res = rname[(args,kwargs)] except: res=0 rname[(args,kwargs)] …

Member Avatar for sepp2k
0
346
Member Avatar for ndeniche

I'm building a website that requires some image preloading, which is handled smoothly with an overlaid splash screen and a progress bar and a spinner. The thing is, I want the preloader to know if preloading is necessary (the cache has been wiped, or is disabled in the browser), so …

Member Avatar for asmira
0
337
Member Avatar for Moderns

Hi mates, I am looking for a way to cache a PHP page that it's different for each session user. For example if the paginating is used and if I have 10 pages each page contains 25 entries extracted from database, also these entries are editable when clicking on button …

Member Avatar for LastMitch
0
347

The End.