Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon What are the prerequisites before clearing cache in MoonShine


What are the prerequisites before clearing cache in MoonShine


Before clearing the cache in MoonShine, it is essential to ensure that certain prerequisites are met to avoid potential issues. Here are the key steps to follow:

1. Backup Your Data: Always back up your database and any important files before clearing the cache. This ensures that you can restore your application if anything goes wrong.

2. Check for Active Sessions: Ensure that no users are actively using the application. Clearing the cache may disrupt their sessions and lead to unexpected behavior.

3. Review Configuration Settings: Verify that your application configuration settings (in the `.env` file and `config` directory) are correct. This includes checking the `APP_URL`, database connections, and any other relevant settings.

4. Ensure File Permissions: Make sure that your application has the correct file permissions to read and write cache files. This is particularly important if you are using a shared hosting environment.

5. Use Version Control: If you are using version control (like Git), ensure that all your changes are committed. This allows you to revert back to a previous state if necessary.

6. Inform Users: If your application is in production, inform users about the maintenance window during which the cache will be cleared. This helps in managing expectations.

By following these steps, you can safely clear the cache in MoonShine and minimize the risk of encountering issues.

Citations:
[1] https://github.com/Moonshine-IDE/Moonshine-IDE/issues/49
[2] https://moonshine-laravel.com/docs/resource/getting-started/troubleshooting
[3] https://moonshine.cutcode.dev/section/contribution
[4] https://www.youtube.com/watch?v=fCGEd87ieEQ
[5] https://www.youtube.com/watch?v=0IyzwluNXBU
[6] https://github.com/moonshine-software/moonshine
[7] https://www.youtube.com/watch?v=StLhum9ALpg
[8] https://github.com/moonshine-software