Book Image

Building a Web Application with PHP and MariaDB: A Reference Guide

By : Sai S Sriparasa
Book Image

Building a Web Application with PHP and MariaDB: A Reference Guide

By: Sai S Sriparasa

Overview of this book

Table of Contents (17 chapters)
Building a Web Application with PHP and MariaDB: A Reference Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 7. Caching

In the previous chapter, we went over the basics of authentication and access control. We started with an understanding of how a user can be authenticated onto our student portal, and then continued to set up access permissions to users. We progressed by creating multiple user roles to utilize the access permissions and restrict access based on the user roles. In this chapter, we will look at different mechanisms to cache the data that we are working with. We will have to consider scaling the application since, at some point, the application will grow bigger and the number of users accessing our student portal will increase. Scaling can be done in multiple ways, such as:

  • By adding more hardware

  • By optimizing our network

  • By refactoring our code to perform better and giving it some performance tweaks

  • By reducing the number of calls to our database and filesystem

We will cover the last method of scaling in this chapter, while we will go over the third topic in Chapter 10, Performance...