Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Caching WWF
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Caching WWF

 Post Reply Post Reply
Author
nexus View Drop Down
Groupie
Groupie
Avatar

Joined: 23 May 2005
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote nexus Quote  Post ReplyReply Direct Link To This Post Topic: Caching WWF
    Posted: 14 April 2006 at 9:49am
Hi,
 
Is this possible in WWF, or to be more precise: in ASP?
 

Quote A few weeks ago, I was editing a page on the dev.joomla.org website (cannot remember which one right now) and something happened that really sent my blood pressure through the roof. I was editing the page, and had spent a considerable amount of time thinking about the text… in fact, I had probably had the window open for the better part of an hour as I looked things up and made sure that my text was accurate. Now, a large number of you already know the problem. For those of you who are fortunate enough to NOT know what happened to me, consider yourselves fortunate.

After I was done editing the article and was quite happy with the results, I hit the save button. I was pleased with myself as the page loaded, knowing that I had just finished a task on my TODO list and could move on to the next thing. This is why when the page did load, and what I saw was the administrator login screen I almost threw my computer out of the window with disgust. No article listing screen, no satisfying message saying that my article had been saved… just the Joomla equivalent of the hated blue screen of death.

It was just after the anger left me that I had a moment of clarity… I knew one thing:

  1. I had to waste an hour of my day redoing what had just been lost to an annoyance so great I cannot begin to describe it .

So what is all this about? The idea is that whatever you are doing in the administrator, if you get auto-logged out (timed out) then the system stores your state right before it logs you out. Also, when you log back in, the system checks to see if you have a saved state. If you DO have a saved state, it returns you to where you would have been if you had not been timed out.

And what about this.. could this reduce db hits even further?
Quote I've adjusted it so that most of the database population is done via XML files to reduce the amount of "raw" SQL commands in an insert.php file. Manual inserts can be tricky when database schematics change, etc. IP.Converge only has one such manual insert SQL command which makes things much easier to maintain.

Cheers!
Kristoffer :o)


Edited by nexus - 14 April 2006 at 9:51am
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 10:08am
The way HTTP works it is a stateless protocol, so unless you can make some caching system on your own PC (client side) a caching system like you propose is not going to save you in this particular case.

If you are having issues with being logged out of your forum you can edit the file 'functions/functions_session_data.asp' and set the variable below to true so that the session state is stored in the database rather than the more volatile web servers memory. This will be a performance hit, but you may decide it is worth it.

Const blnDatabaseHeldSessions = True

As to your second point, I'm not overly keen on using XML in the way you mention as it just ads an extra layer of complexity and more processing to do server side.

I do have plans on modulising the code more and placing the SQL into one file, when I come to do this I may look at using XML for this in more detail.
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 5:08pm
I've gotten into the habit of copying to the clipboard whatever I am about to submit just before I press the submit button... just in case.  There are many times, using various websites, that I had lost what I had just submitted (some kind of error occured), only to press the back button to find what I typed gone.  Being able to paste what I had just copied to the clipboard back into the submit box helps me keep my sanity.

For those of you using Windows, you would do this:

Put cursor in textbox, press Ctrl-A (to select all), press Ctrl-C (to copy what is selected).

If things go bad, just go back to the submit form and do a Ctrl-V (paste).

You can also right-click in many cases, but the keyboard shortcuts will always work even if there is no menu option for cut, copy & paste available.

I know its a work-around instead of a solution, but I thought I'd share it since its saved me from pulling out what's left of my hair. Wink


Edited by wistex - 14 April 2006 at 5:09pm
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 5:14pm
Maybe an idea then is to have a 'copy to clipboard' button, that fires a javascript event that saves the contents of the post to the clipboard before hitting the submit button.

Maybe something worth looking into.
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2006 at 6:19pm
Originally posted by -boRg- -boRg- wrote:

Maybe an idea then is to have a 'copy to clipboard' button, that fires a javascript event that saves the contents of the post to the clipboard before hitting the submit button.

Maybe something worth looking into.

That sounds good.  Just make sure its optional or that the user has to take action to use it (i.e. press the button).  Sometimes I had other things saved on my clipboard that I want to save for something else.  I usually don't bother pasting to the clipboard if I am only writing one or two lines.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2006 at 10:13am
I was thinking of a little 'Paste to clipboard' button on the toolbar.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.