Updating Cached Front-Facing Content After Gallery Edits
Overview
Documentation of the process of refreshing cached front-facing content after editing gallery images in the Albums CMS.
Use cases
- Add a new image to the gallery
- Edit an existing image in the gallery
- Delete an existing image in the gallery
- Click "update cache" button for the gallery
- Update the Album's cache
Process
Adding a new image to the gallery.
- Click "add image" button.
- JavaScript handler invokes the shared AJAX script, which returns the markup for the form as JSON.
- Modal dialog opened with littled formDialog.js library.
- Form filled out and submitted.
- Shared AJAX handler saves image edits.
/_ajax/images/edit_image.phpGalleryUploadClassinstance ofimage_upload_classGalleryUploadClass::save()parent::save()
- Shared AJAX handler saves image edits.