-
MathType
-
WirisQuizzes
-
Nubric
-
CalcMe
-
MathPlayer
-
Store FAQ
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
Configure formula storage and cache
Reading time: 2minConfigure how MathType Integration Services store rendered formulas and manage cached content. Proper storage and caching improve performance, reduce unnecessary rendering operations, and ensure that formulas remain available across application restarts.
After completing this guide, your MathType Integration Services deployment will store formulas and manage cached files according to your deployment requirements.
Before you begin
Requirements
Make sure you have:
- A working MathType Integration Services deployment.
- Access to the
configuration.inifile. - Permission to restart the application if required.
Applies to
Self-hosted MathType Integration Services.
Steps
Configure the storage location
Integration Services store rendered formulas in a directory accessible to the web application. Choose a storage location that:
- Is writable by the application.
- Persists across application restarts.
- Is included in your backup strategy, if long-term persistence is required.
Configure the appropriate storage directory in configuration.ini.
- See MathType Integration Services parameters for the available configuration options.
- For advanced deployments, you can replace the default filesystem storage with a custom storage implementation. See Configure custom formula storage.
Configure formula caching
Integration Services use a cache to avoid rendering the same formula multiple times. Choose a cache location that:
- Is writable by the application.
- Provides sufficient storage space.
- Can be safely regenerated if its contents are removed.
Configure the appropriate cache directory in configuration.ini.
See MathType Integration Services parameters for the available configuration options.
Clean the cache safely
The rendered image cache can be safely deleted to free up disk space, as it is automatically regenerated when formulas are requested.
Do not delete the formula storage directory if your deployment uses image save mode. In that mode, the formula directory stores the MathML associated with the generated images, and deleting it may permanently prevent existing formulas from being recovered.
Some integrations (such as Moodle) do not rely on the formula directory in the same way. If you need to clear the MathType Integration Services cache without removing the storage directory, use the MathType Integration Services cache-cleaning service.
See MathType Integration Services parameters for the available cache cleaning options.
Apply the configuration
Depending on your deployment, configuration changes may require restarting the service.
| Deployment | Action |
|---|---|
| PHP | Changes are typically applied immediately. |
| Java | Restart the application server. |
| Docker | Restart the container if the configuration file is mounted during startup. |
| .NET | Restart the web application if required by your hosting environment. |
Verify the configuration
Verify that the configuration endpoint returns the expected configuration.
See API services for the endpoint URLs available on your platform.
Verify it worked
Insert one or more formulas using your frontend integration. After saving the content:
- Verify that rendered formula files are created in the configured storage location.
- Verify that subsequent requests reuse previously generated formulas instead of creating new ones.
- Verify that formulas remain available after restarting the application.
Options and variations
Use the default filesystem storage
The default filesystem storage is suitable for most deployments and requires no additional customization.
Use custom storage
Enterprise deployments can replace the default filesystem with a custom storage solution, such as cloud object storage, shared storage, or a database.
Clean cached files
If you need to recover disk space, cached rendering files can be removed safely because they are regenerated automatically when formulas are requested again.
For the available cache cleaning options, see MathType Integration Services parameters.
Common issues
Formula files are not created
Verify that:
- The configured storage directory exists.
- The application has write permission for the storage directory.
- The configured storage path is correct.
Formulas are regenerated on every request
Verify that:
- The cache directory exists.
- The application has write permission for the cache directory.
- The configured cache path is correct.
Formulas disappear after deployment or restart
Verify that:
- The storage directory is located outside temporary directories.
- The storage location is preserved across deployments.
- The directory is included in your backup strategy if persistence is required.
Formulas cannot be recovered after cleaning storage
Verify that:
- Only the cache directory was removed.
- The formula storage directory was preserved when using image save mode.
- A backup of the storage directory is available for recovery.