 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Maarten Balliauw's Blog: Running Memcached on Windows Azure for PHP
by Chris Cornutt October 24, 2011 @ 21:52:11
Maarten Balliauw has a new post to his blog with a guide to running mamcached on Windows Azure for PHP, a tool targeted towards PHP on Windows users to provide them with the ability to cache outside of their application.
While Windows Azure offers a distributed caching layer under the form of the Windows Azure Caching, that components currently lacks support for non-.NET technologies. I've heard there's work being done there, but that's not very interesting if you are building your app today. This blog post will show you how to modify a Windows Azure deployment to run and use Memcached in the easiest possible manner. Note: this post focuses on PHP but can also be used to setup Memcached on Windows Azure for NodeJS, Java, Ruby, Python...
He provides a phar-based scaffolding you can use to set up the instance and describes two ways of accomplishing it - the "short way" of relying on the scaffolding or the "long way" describing what the scaffolder does behind the scenes (complete with code). For this, you can also download the source and look through it.
voice your opinion now!
windows azure memcached caching tool tutorial
Script-Tutorials.com: How to use Memcache with PHP
by Chris Cornutt September 28, 2011 @ 11:06:47
In a new tutorial from the Script-Tutorials.com site, they introduce you to memcache, an external caching tool that can help speed up the performance of your application dramatically.
Today we will talking about caching in PHP again. I will show you how you can use Memcache in PHP. We will prepare useful class for working with Memcache for us and several examples. Memcache itself providing procedural and object oriented interface to memcached, highly effective caching daemon, which was especially designed to decrease database load in dynamic web applications.
Included in the article is a simple "CacheMemcache" class that handles the dirty work for you of connecting to the memcache instance and pushing/pulling the data from the remote source. Also included are a few examples of its use - storing simple objects, pulling the same data back out and deleting a record. The source for the tutorial can be downloaded here. You can also find out more about using memcache in the PHP manual (Note: it does require an extension to be loaded to support this functionality).
voice your opinion now!
tutorial memcache caching
Script-Tutorials.com: How to Use APC Caching with PHP
by Chris Cornutt September 15, 2011 @ 08:29:14
On Script-Tutorials.com today there's a new article introducing you to using APC caching in your PHP applications. Their simple example sets up a caching class that handles the dirty work for you.
Today I have another interesting article for PHP. We will talking about caching, and practice of using caching in php. I will make review of APC caching and will show you how you can use APC in PHP. [...] Now people have learned to use the server memory for data storage. RAM much faster than hard disk, and the price of memory falls all the time, so let's use all these advantages of this.
Included in the post is the code for a few different files - the caching class itself that implements the APC functions in PHP and some examples of it in use: saving objects, fetching data from the cache and removing things from the cache.
voice your opinion now!
caching apc tutorial class add remove fetch
DevShed: Cache Data in RAM with PHP
by Chris Cornutt June 08, 2011 @ 10:48:23
DevShed has posted a new article in their series looking at storage interfaces and how to use them. In this latest article they show how to create a caching layer that will allow you to work with any sort of caching backend you'd like.
As with other elements of object-oriented programming, it's possible to use segregated interfaces in a great variety of scenarios and conditions and, therefore, enjoy the benefits that they provide right out of the box. [...] My goal in this article is to create an extendable caching system based on the contract defined by a segregated interface. To achieve this, the first step we need to take is to create the interface in question.
He shows how to create the "CacheableInterface" that provides the structure for the child interfaces to follow. It provides methods for setting, getting, deleting and checking to see if a key exists. They illustrate its use with an interface to an APC cache, a file caching and a class that uses dependency injection to define the interface to use.
voice your opinion now!
caching data ram tutorial apc filesystem interface
Chris Jones' Blog: More on PHP and Oracle 11gR2 Improvements to Client Result Caching
by Chris Cornutt March 04, 2011 @ 09:56:33
Chris Jones has posted more information to his Oracle blog about the caching and other improvements that come along with the Oracle 11gR2 release that can be used in PHP applications.
Oracle 11.2 brought several improvements to Client Result Caching. CRC is way for the results of queries to be cached in the database client process for reuse. [...] PHP OCI8 as a "client" of the database can use CRC. The cache is per-process, so plan carefully before caching large data sets. Tables that are candidates for caching are look-up tables where the network transfer cost dominates.
Like many of the other server-side tools Oracle has to offer, it's pretty simple to enable this caching. Before you had to add a custom bit to your query to tell it to enable the caching. Now it's as simple as setting it up on the CREATE or ALTER for the table - nothing extra for the developer to do.
voice your opinion now!
oracle caching client result create alter
Web Development Blog: Why should you cache your PHP website?
by Chris Cornutt February 15, 2011 @ 09:09:58
On the Web Development Blog Olaf helps to answer the question "why should you cache your PHP website?" with a few helpful tips, bits of code and pointers to other tools.
Most web servers are able to handle "normal" traffic and there are plenty of websites which doesn't have so much traffic. So maybe you ask yourself: Why should you cache your PHP powered website? The apache web server is able to serve many, many files at the same time, but all these files need to be static. A PHP script is parsed by the web server and next the generated HTML data is send to the client (web browser). While this happens the server need to use much more memory than by sending a file to a web client. Imagine what happens if you run/parse a page which is build with WordPress...
He points out the WordPress Super Cache plugin and mentions that there's lots of other tools out there in the form of plugins or things like eAccelerator. He even includes a simple custom caching script that grabs the contents of a remote file and caches it locally for twenty-four hours.
voice your opinion now!
caching recommendation tool supercache eaccelerator custom
Kevin Schroeder's Blog: Pre-caching FTW
by Chris Cornutt January 07, 2011 @ 11:16:57
In this new post to his blog Kevin Schroeder suggests that there's something even better than doing the typical caching inline (request, write to cache) - pre-caching.
I just had an epiphany. I've talked about pre-caching content before and the benefits thereof before. But this is the first time I realized not only that there are benefits, but that doing it is BETTER than caching inline. Let me sum up... no, there is to much. Let me explain.
He gives an example of how a typical application might cache - when it finds a "miss" for the data it's trying to pull. A simple cache is easy, but what happens if it uses a configuration value that could change (like the username/password in his second example). Pre-caching would eliminate the risk since the setting would be known to be valid when the cache is generated.
voice your opinion now!
caching precache inline setting invalid miss
Simas Toleikis' Blog: PHP data caching techniques
by Chris Cornutt December 13, 2010 @ 08:45:10
Simas Toleikis has posted some caching techniques he's come up with to handle a few different situations including simple file-level caching and working with memcached.
Caching intermediate data is the most primitive and yet the most rewarding optimization technique where you don't need to fiddle with any complex algorithms or premature optimizations. If you are into PHP you should be aware of all the best practices and the right tools for this job to make your websites fly.
He covers a few different, though common, situations you may come across in your application where caching could be very helpful:
- Static scope variables
- APC shared memory functions
- Memcached for large distributed caches
- In-memory database tables
- Simple file-level caches
voice your opinion now!
caching technique situation apc memcache file memory
NETTUTS.com: Caching, YQL, and Regular Expressions
by Chris Cornutt November 10, 2010 @ 10:07:14
On NETTUTS.com today there's a new tutorial showing you how to work with YQL for pulling information from remote feeds and PHP (with regular expressions) to handle filtering and caching.
In today's tutorial, we're going to mix a handful of technologies. First, we'll review how to implement a simple form of text file caching with PHP. To illustrate this technique, we'll use the wonderful YQL to query Twitter's search API for a list of tweets which contain the string, "nettuts." Finally, we'll experiment with PHP's regular expression capabilities, and will turn all Twitter usernames and urls into clickable links.
They show you (with the help of a few screenshots) how to get the YQL system to work with your PHP scripts and how you can fun a simple query against it. They use a simple file-based caching technique and a regular expression (not the simplest thing, mind you) to extract usernames and links from the results.
voice your opinion now!
yql caching regular expression tutorial twitter
|
Community Events
Don't see your event here? Let us know!
|