Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Reducing database usage

Featured Replies

Just need your opinions guys, I'm in the process of implementing a new feature to my CMS which will effectively require a database request everytime a page with the feature is present, is loaded.

 

I was just wondering if anyone knew any way to avoid accessing the database everytime - perhaps a method of caching?

 

It doesn't seem like much, but say 100 users hit my page, that's alot of additional database requests that I would like to avoid if possible.

 

Thanks in advance!

First of all I wouldn't worry about it as it wont affect page loading speed ( unless you have a massive data and crappy database ).

 

Otherwise you can use Sessions.

 

What data is coming from the database ?

  • Author

First of all I wouldn't worry about it as it wont affect page loading speed ( unless you have a massive data and crappy database ).

 

Otherwise you can use Sessions.

 

What data is coming from the database ?

 

I can't use Sessions as it's going to be user content entered via the CMS which will be pulled, "labels" of text if you like so users can, for example, change there form labels without having to worry about affecting any of the form code.

 

So if I have 10 form labels, each read from a database, it's essentially 10 db requests.

 

This is just an example, it can be used for other things such as snippets of text on dynamically generated pages that the client would otherwise not have access to change.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.