diff --git a/README.md b/README.md index b5afc1f..6639d21 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ import 'controllers' * `turbo_stream.set_cookie_item(key, value, **attributes)` * `turbo_stream.set_focus(target, **attributes)` * `turbo_stream.set_title(title, **attributes)` +* `turbo_stream.turbo_clear_cache()` ### Browser History Actions diff --git a/lib/turbo_power/stream_helper.rb b/lib/turbo_power/stream_helper.rb index 9573a19..182bfd5 100644 --- a/lib/turbo_power/stream_helper.rb +++ b/lib/turbo_power/stream_helper.rb @@ -165,6 +165,10 @@ def set_title(title, **attributes) custom_action :set_title, attributes: attributes.merge(title: title) end + def turbo_clear_cache(**attributes) + custom_action :turbo_clear_cache, attributes: attributes + end + # Browser History Actions def history_go(delta, **attributes)