πŸ—ΊοΈ
Mapster WP Maps
HomeProExamplesContact
  • Getting Started
    • About
    • Installation
    • Key Concepts
    • Importing/Exporting
    • Guides
      • Your First Map
      • Creating a Crowdsourced Map
      • Set Up Recurring Import
      • Adding a Custom Style
      • Building a Custom Popup
  • Creating Shapes
  • Displaying Maps
  • Maps
    • Map Tiles
    • Initial View
      • Fit to Features
      • Manual Values
      • User Location
    • Map Size
    • Points, Lines, Polygons
    • Clustering
    • Interactivity
    • Controls
      • Basic Controls
      • Geocoding & Geolocation
      • Togglers
      • Other Controls
      • Control Render Order
    • Filters
      • Category Filter
      • Custom Search Filter
      • Filter Dropdown
    • Lists
      • Store Locator
    • Specialty Maps
      • Map Comparer
      • Heatmaps
      • Elevation Profile
      • User Submission
      • Listing Page Map
    • Preloader
    • Developer
      • Javascript
      • Embedding Maps
      • Faster Loading (Cache)
      • Caching
      • Progressive Loading
  • Locations
    • Markers
    • Circles
    • Labels
    • Icons
    • 3D Models
  • Lines
    • Lines
  • Multi Lines
  • Polygons
    • Flat Polygons
    • 3D Polygons
    • Image Polygons
  • Multi Polygons
  • Popups
    • Popup Templates
      • Introduction
      • Layout, Colors, Text, CSS
      • HTML
      • Options
    • Popup Content
  • Pro Sections
    • User Submission
      • Overview
      • Submission Interface
      • Adding Custom Fields
      • Submission Admin
  • Mass Edit
  • Settings
    • General
    • Account Management
  • Advanced
  • Import
  • Tileset Management
  • Developer
    • Mapster Map ACF Field
    • Mapster Map Gravity Forms Field
    • Custom Scripts
    • Hooks
    • Spatial DB & API
    • Internationalization
Powered by GitBook
On this page
  • Downsides to Caching
  • How to Use Caching

Was this helpful?

  1. Maps
  2. Developer

Caching

Make your page load extremely fast with caching.

Available in Pro only.

Normally, when you load a map on the frontend, Wordpress has to assemble all the posts along with all their metadata and send it to the user. Then the user receives this, and the response is parsed and the geographies loaded onto the map.

The heaviest part of this β€” the part that slows down loading the most β€” is the work Wordpress has to do in order to assemble and query all the geographies. If you have hundreds or thousands of geographies, this can take more than a few seconds, especially if you have a lot of metadata too.

The cache works by generating this response one time, and then placing it into a static file in your Uploads folder. This file is then returned instantly whenever your map is loaded. This means the response time only requires the user to load the file and have it parsed.

If the file is large β€” with many thousands of complex polygons, for instance β€” the time could still be slow, but it will be many times faster than Wordpress querying it.

Downsides to Caching

When you cache, it generates a static file of your map at that moment. That means that any new geographies you add, or any changes you make to existing geographies or map settings, won't be automatically included.

When you make these changes, remember to come back to the Cache section and press "Refresh Cached Response" in order to update that static file.

How to Use Caching

Turn on Use Cache and then press Generate Cache Response. Once it's done, then you are now using a cached file!

PreviousFaster Loading (Cache)NextProgressive Loading

Last updated 16 hours ago

Was this helpful?