How can we Repair and Rebuild when creating a record through a custom hook file after save functionality? Note:- It saves records when we need them not regularly.

Hello all,

I'm wondering if there is a way to trigger Repair and Rebuild automatically when creating records via hooks after saving. I have a custom module where I create records, and I'm currently updating the JS file manually after creating each record to trigger Repair and Rebuild. Rather than having to go through the admin section to trigger Repair and Rebuild each time, I'd like to automatically run Repair and Rebuild as part of the record creation process.

Does anyone know if it's possible to automatically trigger Repair and Rebuild from a hook after saving a new record? Any pointers on how I could implement this would be greatly appreciated!

Thank you!

Parents
  • Hi  ,

    The repair & rebuild process is not something I recommend attaching to record creation. This process is highly destructive and can potentially cause corrupted cache files (i.e. system down problems requiring a manual clearing of cache files at the server level) when it runs during user activity. For these reasons, we recommend to all our clients to only perform processes that trigger repair and rebuild (e.g. module/plugin deployments, Studio updates, etc.) during maintenance windows where user activity is non-existent or at a minimum. 

    Why are you seeking to rebuild cache every time a new record is created in your hook?

    Chris

Reply
  • Hi  ,

    The repair & rebuild process is not something I recommend attaching to record creation. This process is highly destructive and can potentially cause corrupted cache files (i.e. system down problems requiring a manual clearing of cache files at the server level) when it runs during user activity. For these reasons, we recommend to all our clients to only perform processes that trigger repair and rebuild (e.g. module/plugin deployments, Studio updates, etc.) during maintenance windows where user activity is non-existent or at a minimum. 

    Why are you seeking to rebuild cache every time a new record is created in your hook?

    Chris

Children