Implementing better caching technique

After playing a little bit with memcache I had to implement better caching technique. Site was down for some hours, I look what happened…it was an error, which I didn’t see any time before…

Problem was with session table – it is stored in mysql. In log I saw something is not goot with session table, so I tried to repair it. After myisamchk I saw something is wrong with inodes…First I checked, if hdd is not full – no, there is more than 100 GB of free space. I am not unix guru, so I didn’t know what exactly is inode. Google helps again, so I checked free inodes with df -i, and yes – no inodes was free. For you, who doesn’t know what inode means – read more at wikipedia. Problem is – current cache implementation cached into files – in dir structure like this: cache/af/1b/4c/2d/af1b4c2d…gz – on hdd was so many files, no inode was free to make another file. This was serious problem, so I deleted some portion of cache and start thinking of better implementation, because this one has own fallbacks – for example deleting whole cache takes 1 week or so…strange,eh ?
So I decided to implement cache into MySQL, it has own drawbacks too, but it should work better in general. We will see, if it was good decision 🙂

Show archived comments
  1. Memcache can also be used for storing sessions, just put session.save_handler = memcache in your php.ini

    Its faster then mysql but you lose all sessions when you restart the memcache deamon.

    Thanks for the good work guys, keep it up!

  2. thanks anonymous for nice comment. Yes, it seems storing sessions into memcache is really good idea. I will experiment with that 🙂

( 2 Responses )

Read more

90fm trivia

The Role of Subtitles in Trivia Mastery

The 90FM Trivia Contest, hosted annually by the University of Wisconsin-Stevens Point’s student-run radio station WWSP 90FM, stands as a testament to the enduring allure of trivia. Established in 1969, this 54-hour marathon challenges participants with a relentless stream of questions, demanding not only vast knowledge but also strategic resourcefulness. As teams gear up for “Trivia 55: NO LIMIT,” scheduled for April 11-13, 2025, the importance of diverse research tools becomes ever more apparent.

What can global subtitles reveal about how often – and how meaningfully – films say ‘I love you’?

New research by film data expert Stephen Follows uses subtitle data from OpenSubtitles to explore how often films include the phrase “I love you” and how characters respond when they hear it.

Drawing on over 72,000 English-language subtitle files from fiction feature films made between 1911 and 2022, the analysis reveals patterns in cinematic declarations of love across genres and decades.