I am wondering what other simple-to-use caching mechanisms exist for PHP, except APC cache, that work fine with php running as CGI.
Configure Command
'./configure' '--prefix=/usr/local/php5' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-config-file-path=/usr/local/etc/php5/cgi' '--with-curl=/usr/local/lib' '--with-gd' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--enable-gd-native-ttf' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring'
Server API CGI/FastCGI
What I am looking for is a simple memory caching system, that allows me to store variables, set TTL, and then retrieve them from memory. I am NOT looking for opcode cache.
NOTE: I cannot switch to PHP CLI or other SAPI. I’ve also tried installing APC on this environment and it works just per request (can not be accessed on refresh).
You are probably looking for Memcached http://www.memcached.org/
PHP has a module for it: http://php.net/manual/en/book.memcached.php