News Feed
Sections

News Archive
feed this:

Ibuildings Blog:
The definition of evil
August 13, 2008 @ 08:44:17

On the Ibuildings blog there's a new post that looks at the "evils" of a crucial part of many web applications - caching.

Recently a colleague stated that in theory, caching could be considered 'evil'. Now 'evil' is a very broad term which is used a lot in the IT community, but what does it really mean when we're talking about technical solutions? I asked around, but couldn't find a clear cut definition, so I went searching...

In his search he came across a wide range of definitions, including one mentioning bad design or implying a lack of goals with a summarized meaning of "does harm to your aesthetic and engineering judgment". He applies this to caching and, because of it being a sort of counter-intuitive way to handle content (not just the pull and push), it could be considered slightly evil. Interesting interpretation...

However, as anyone will tell you caching is a very necessary evil. [...] So while it does some minor harm to aesthetic and engineering judgment, the user gets a fast experience, which is really all that matters in the end.
0 comments voice your opinion now!
evil caching ibuildings definition counterintuitive required



Community News:
Stablr Project Launched (A More Stable, PHP-Base Twitter)
May 26, 2008 @ 10:29:28

Along with the popularity of Twitter has come one of it biggest problems - its instability. More and more people are using the service every day and some are leaving when they encounter the frustration of too much downtime. Enter a project that Graham Christensen is getting started - Stablr, a PHP-based version of the popular web service.

Stablr, the proposed name, will be the main gateway for it's users. People will post to Stablr, which will then (when it can) forward it to Twitter. If a Stablr users posts to Twitter directly, the message will be retrieved and replicated on Stablr. Responses to posts, direct messages, and tweets from friends of Stablr users would also be replicated.

He's already seen some great response from the community with offers to help and has taken it to the next level by coming up with a five-page document detailing the plans behind the project (using things like caching, an Access database and Jabber integration).

0 comments voice your opinion now!
twitter project stablr caching access database jabber


Kae Verens' Blog:
efficient JS minification using PHP
May 21, 2008 @ 10:25:35

In a new post today, Kae Verens takes a look at a method for easy and quick javascript minification with help from a little bit of PHP.

A useful part of minification is that during the act of compiling your minified source, you can also pull in other JavaScript files and compiled them all into one single source. This has a major advantage that there is only one file to download.

The method runs a file_get_contents on each of the javascript files, and pulls their content into a single PHP variable. This value is then just echoed out after it's passes through this minimizer class.

Kae also offers an alternative to performing this expensive operation each time - caching then checking the md5 hash of the cache to see if it's different than the current version. Example code is included.

0 comments voice your opinion now!
efficient minification filegetcontents caching javascript


IBuildings Blog:
ATK and Caching
April 08, 2008 @ 11:22:22

On the IBuildings blog today, Sandy Pleyte has posted a look at using the ATK framework and what kind of effect its own recently added caching system (atkCache) has on its performance.

Now there is a cache object (atkCache) available in the ATK SVN trunk. The new atkCache class is a factory class, which builds and returns instances of atkCache which has all the methods to communicate with an external cache to handle the actual storage and retrieval.

It supports lots of different backend caching methods - APC, eAccelerator, the Zend Platform functionality, memcache, xcache and both file and variable caching.

He includes an example of its use - creating an object to cache to a file, configuring it with options like lifetime and path, and an example of its use (to cache a theme for a web page).

0 comments voice your opinion now!
ibuildings atk caching framework example atkcache backend


Mike Willbanks' Blog:
PHP Performance Series Caching Techniques
February 27, 2008 @ 10:25:00

On his blog today, Mike Willbanks has started up a new series that will look at various caching techniques that are available to PHP developers now:

Welcome to the first edition of the PHP performance series, a new series that I will be explaining ways to gain efficiencies and squeezing more performance out of your applications. This first edition, caching techniques, focuses on ways to cache data to optimize your current sites. Some of the concepts here are fairly easy to implement while others may take strategic design in the architecture of your application.

The methods he looks at this time are:

  • Opcode Caching
  • File Priming
  • Caching Variables
  • File Caching
  • Memory Caching
  • Database Memory Tables
  • RAM Disk
0 comments voice your opinion now!
performance series caching technique opcode file database ram


Tilllate Blog:
Caching of Dynamic Data Sets
December 05, 2007 @ 10:29:00

On the Tilllate Blog, there's a new post discussing the use of caching in applications, specifically for dynamic data.

Consider you have a set of data that is changing dynamically for each page request and you need to cache that data the fastest way possible. You can't cache dynamic and unpredictable data as a whole, can you? Hence, we would put each data entry into cache separately to be able to fetch it separately and dynamically. But this means bombing your cache infrastructure with with requests.

They break it up into a few different topics - caching text elements on the page, two-tiered caching (grouping cached items), incremental caching and cache versioning. They don't share an example of their code unfortunately, but they do mention something about a possible contribution to the Zend_Cache component of the Zend Framework.

0 comments voice your opinion now!
caching dynamic data text element incremental versioning cache caching dynamic data text element incremental versioning cache


SitePoint Server Side Coding Blog:
Cache it! Solve PHP Performance Problems
November 09, 2007 @ 19:16:00

On the SitePoint "Server Side Coding" blog, there's this look at caching to help solve some PHP performance issues.

In the good old days when building web sites was as easy as knocking up a few HTML pages, the delivery of a web page to a browser was a simple matter of having the web server fetch a file. [...] Then dynamic web pages came along and spoiled the party by introducing two problems: a delay for processing and a check of the file's age before it's sent to the browser.

They talk about what caching can do for you, what you can do (both server and client side) to prevent caching, working with the headers sent from and back out to the browser, using output buffering, partial caching and using PEAR::Cache_Lite in your application.

0 comments voice your opinion now!
caching serverside clientside pear cachelite package partial caching serverside clientside pear cachelite package partial


The Bakery:
Mambo, Layout Switching, SimplePie and Caching Elements
July 25, 2007 @ 11:09:00

The Bakery has four new articles/tutorials posted today covering things like Mambo's choice to go with CakePHP, a layout switcher, SimplePie and caching elements.

  • Mambo-licious - Join us in welcoming Mambo to the CakePHP community.
  • Automatic Layout Switcher - This component allows you to have two layouts for one site and switches between them automatically based on the domain.
  • SimplePie CakePHP Component - SimplePHP is a PHP class for retrieval and parsing of RSS feeds.
  • Cache Elements Individually For Each User - Caching elements in general has been discussed before on bakery and this article takes caching of an element to a higher level. This article explains how to cache elements individually for each user.

Be sure to check out the rest of The Bakery for more great CakePHP-related content and news.

0 comments voice your opinion now!
cakephp framework bakery mambo layout simplepie caching cakephp framework bakery mambo layout simplepie caching


Webdigity.com:
Caching your pages with PHP
July 16, 2007 @ 18:55:00

On the Webdigity.com forums, there's this new tutorial posted showing how to create a simple caching system with PHP for your site (using cached files).

A problem that this process creates is the server overhead. Every time we execute a query in the database, the instance of our script will call the DBMS, and then the DBMS will send the results of the query. This is time consuming, and especially for sites with heavy traffic is a real big problem.

There are two ways to solve this if you want to make your site faster. First is optimizing the queries Visit through proxy, but we will not talk about this at the present article. The second and most valuable is using some kind of custom caching technique.

Their code, contained in an easy-to-use class, makes it simple to cache the contents of a page just by setting the stop to start the caching from (and where to end).

1 comment voice your opinion now!
caching page class file custom temporary caching page class file custom temporary


Nick Halstead's Blog:
Google Gears Caching of WordPress in PHP
June 01, 2007 @ 09:53:00

With the launch of the Google Gears offline storage functionality, lots of developers are working on solutions to put this new functionality into practice. Nick Halstead has created his own handy little script to help with caching WordPress content.

I was instantly fascinated by Google Gears so I had to immediately try out the sample code that you can download. The tutorial on the website gives a simple example of how to cache a few files using the Resource Store. It makes it very easy to setup a JSON manifest file that contains which pages you want to have cached. Here is an example manifest.

In his example creates the manifest and a JSON interface to it to grab the content from the WordPress site.

0 comments voice your opinion now!
googlegears caching wordpress content googlegears caching wordpress content



Community Events











Don't see your event here?
Let us know!


code developer PHP5 job zendframework framework ajax package mysql cakephp security releases conference zend example book database PEAR release application

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework