Last post Jun 30, 2008 04:28 PM by jonwood
Jun 23, 2008 11:01 AM|jonwood|LINK
Well, I've yet to get a single reply to my post about OutputCache and the Personal Website Starter Kit.
Can I ask this? For those who are using this kit successfully, does each of your pages have an OutputCache statement near the top?
The only way I can get the site to work is to remove these statements. Otherwise, I get cached pages so I don't see different photos, I don't get the Manage menu option right away when I log in, etc. When I remove caching, the site works great.
I think I understand why this happens. What makes no sense is how everyone else seems to be using this starter kit without complaining about this problem. After thinking about it for a few days, the only thing I can think of is that someone went in and added
these OutputCache statements recently, not realizing the problems, and everyone who has successfully been using the site, downloaded the kit before these changes.
It seems like a long shot but, without a single reply (is this thing on...) I have nothing else to go on.
starter kits outputcache caching bugs
Jun 24, 2008 11:03 AM|jwadsworth|LINK
I'll admit it's been awhile since I spent several months extending this kit. However, I don't recall ever removing the OutputCache line and there isn't any in my project. I just checked the original version I downloaded a couple years ago, and it doesn't
have any OutputCache lines in it either.
Jun 24, 2008 11:16 AM|jonwood|LINK
All I can say is "Wow" then. It appears that what happened was that someone just decided to go in and "improve" the kit by adding caching, and screwed it up as a result. However, I know I played with this a while ago and had the same problem so they must've
done so a while ago. You must've downloaded it a long time ago, as you mentioned. At any rate, thanks for the reply! You're the first person to respond that actually uses this kit! Can anyone else confirm?
Jun 26, 2008 10:37 AM|trevorkeast|LINK
I downloaded the kit only a month or so ago and have made considerable changes to it to suit my own needs and desires. However I never ran into the problems that you have been having and I did not need to delete any cache code.
You can check out my site at www.trevorkeast.com
If the cache issue is causing you problems - just remove it and the problem will go away! The personal starter kit is by no means perfect and I have had to spend many hours getting it working just how I want.
Jun 26, 2008 11:19 AM|jonwood|LINK
Thanks, but I'm not able to tell from looking at your site if it has any caching enabled. You said you did not need to delete any cache code, but is that because it worked fine, or because your original download didn't have cacheoutput statements at the
top of each file to begin with? My working theory is that it never had them and that's why your site works just fine. Someone has recently "fixed" it!
I did remove all the cacheoutput statements from my files and that part now works fine.
Another issue I ran into after uploading some photos is that the home page now takes forever to load. (See
http://www.jonathanwood.name.) I can see that it is because the formview control that displays a random picture on the home page actually reads all public images from the album even though it only displays one of
them. But I noticed that your site appears to come up quite fast. So now I wonder if that always worked that way or if this is one of those things you worked to get it how you want. I can rework the code, but I wonder why I need to.
Jun 27, 2008 12:51 AM|jwadsworth|LINK
The slow performance is in fact because of the random photo. If you search this forum, you should find a post with code that you can use to fix this issue.
Jun 27, 2008 01:50 AM|jonwood|LINK
Man, it's nice to actually start running into problems where I'm not the only one. I'll search for it. Thanks.
Jun 30, 2008 03:28 PM|trevorkeast|LINK
The above post is correct. The Personal Starter Kit is awful at storing photos in the database. If you add more than a handful of pics it slows down the site load so much it times out. One of the first things I did was to change this functionality so that
images are not stored in the database. It simply stores the link to the image. I also made other changes to allow videos to be played etc.
Jun 30, 2008 03:47 PM|jonwood|LINK
The main thing that really seemed bad to me was how the random photo on the home page is managed. It queries the database in a way that returns every single image size of every single image. I didn't change the way the data is stored but created some additional
stored procedures that simply returns the IDs of the images. Seems to work well (http://www.jonathanwood.name).
I noticed you didn't answer my other questions though. It sure seems like it would be easy for you to confirm that the starter kit you downloaded has no caching on every page. Since it would help confirm my entire thinking on this, what are the chances you
could check? Thanks.
Jun 30, 2008 04:09 PM|trevorkeast|LINK
To answer your question - I don't have any OutputCache or Cache statements of any kind in my pages. I have no idea how they ended up in your site. Like I said before, I only downloaded the personal website starter kit a few months ago.
Jun 30, 2008 04:28 PM|jonwood|LINK
Okay, thanks. I've noticed that there are a few places to download those starter kits and I'm almost positive I downloaded my copy from this site.. The cache statements were in the download. It works fine now that I've removed them. Obviously, there are
additional considerations on a site with heavy traffic. That won't be a concern with my personal site. Thanks again.