Sword 1.0b5 · A simple and friendly weblogging tool for academic environments created by Fingertips design & development.

 
 
 
 
 

Caching (2)

TrackBack link: http://blog.markjuh.net/markjuh/trackback/2005/4/18/caching_2

Published on 18 April 2005 at 15:18.

Now that I had caching at least working, it was time to get it the way I wanted it to work. Page caching turned out to be quite nice if you are just looking at the page as a visitor, but then after you login, you cannot edit anything, because the links just don’t show up. This is not that weird, since I was caching the whole page and invalidating the page just because someone logs in is a bit silly.

So, then I did some research and it turned out that action caching wasn’t the thing for me either, so I turned to fragment caching. After some initial confusion it turned out to be quite simple and fast.

I also tried to use memcached on my development machine at home. After installing Ruby-MemCache and it’s required libraries and adding the following line to config/environments/development.rb, it worked quite nicely:

ActionController::Base.fragment_cache_store = ActionController::Caching::Fragments::MemCacheStore.new("localhost")

So why use memcached instead of the default MemoryStore? Well, the default MemoryStore creates its own fragment store for each FCGI-process. So it would create more of a burden on your system then just using one central fragment store.

Caching

TrackBack link: http://blog.markjuh.net/markjuh/trackback/2005/4/15/caching

Published on 15 April 2005 at 16:24.

I’ve been trying to get page caching to work. All to no avail, until I asked around in the Ruby on Rails IRC channel. It turned out that in version 0.11.1 caching of pages is broken and that updating to Edge Rails solved the problem.

This was the perfect time to change my repository around and move the vendor part into a SVN external.

lighttpd

TrackBack link: http://blog.markjuh.net/markjuh/trackback/2005/4/15/lighttpd

Published on 15 April 2005 at 08:37.

Just switched this Rails application to FastCGI on lighttpd. And it’s no surprise at all that lighttpd is much faster, since I’ve been using it on my development-machine ever since I started on Rails-applications.

So finally, this blog is a bit more usable. :)

For those of you wondering how I’ve set this up, have a look at (which is what I found when I was looking how to do this):
Having one’s own lighttpd and running it too

So now what?

TrackBack link: http://blog.markjuh.net/markjuh/trackback/2005/4/14/so_now_what

Published on 14 April 2005 at 20:43.

Well, I still have to figure out caching and build support for multiple users. And if possible, try out itex2mml, which basically converts a subset of LaTeX to MathML.

Before anyone comments on it, yes, this does look like WordPress and Typo, but that’s not strange. Typo took it from WordPress and I took some of both. Since it is supposed to be a prototype, I’m not taking the time to make a different design. This one is just clean, nice and readily available.

Prototype online at Textdrive

TrackBack link: http://blog.markjuh.net/markjuh/trackback/2005/4/14/prototype_online_at_textdrive

Published on 14 April 2005 at 20:26.

Yesterday and today I’ve been trying to get this prototype online at TextDrive.

Once you know how to install it, it’s quite simple. But there are some pitfalls. First thing I ran into was that I couldn’t get Apache properly configured. But it turned out I had to disable *.fngtps.textdriven.com or otherwise blog.fngtps.textdriven.com wouldn't work. Then it worked just fine, but just with CGI, which is slow. But I couldn’t get FastCGI to work properly. Someone was kind enough to tell me that there were some problems with the combination of Apache2 and FastCGI on TextDrive. Still have to switch to lighttpd and use Apache2 as a proxy. At least so far it works.

Next obstacle was MySQL… It doesn’t complain when you make tables with the InnoDB engine, but as soon as you try to insert values into the table, it returns an error (#1030 - Got error -1 from storage engine). It took me hours of searching on Google and trying things to figure out that just switching to MyISAM fixed the problem.

Then once it was online, I disabled the signup-functionality of the login generator I used, imported the blog entries I had been typing in a text-file.

Then I found out my Atom feeds were containing quite a few errors, so I found a feed validator and the The Atom Syndication Format 0.3, which helped me correct the mistakes I had ignorantly made.

Only annoying thing left was that I had no real titles for each post, so I took some time to read what I had written before and come up with a title. :)

1 2