• Recently installed the plugin. Despite my cache timeout being set to 6 Months, every entry that shows up in the Endpoint API Caches tab says 1 hit, expired and inactive right off the bat, which obviously means the endpoints are not benefiting from the cache. Grateful for any assistance, thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @db654

    Thank you for using our plugin!

    I am sorry to hear you are experiencing this problem. To better investigate this issue could you please tell us what version of WordPress you are running? And what other plugins are active?

    Hey, I had the same problem with contents published on Object Types (custom post type) with “-” (hyphen) between its name.

    I’m using pods plugin to create custom post types, if I make a custom post type with a hyphen, the cache will expire immediately.

    It’s only related to object types because I tried to define a custom post type with a name without a hyphen and an API endpoint with the same name but using some hyphen inside and works well.

    So my recommendation:
    – do not define your types with a hyphen
    – don’t worry about endpoint names

    Plugin Author Richard Korthuis

    (@rockfire)

    Hi @fedegonzal

    Thank you for your feedback. I have tried creating a custom post type with the Pods plugin and giving it a name with a hyphen in it. However, the caches do not expire immediately on my local test environment. So either you have some extra settings which cause this, or there is a conflict with some other plugin.
    I see the Pods plugin has a component Migrate: Packages to export your pods. Would you be willing to create an export of the custom post type you are having this issue with? If you don’t want to publish it on this open forum, you can also email it to plugins [at] acato [dot] nl.
    Also a list of all you active plugins would be helpful to find the cause of this problem.

    Hi Richard,

    I have been exported two custom post types:
    – cideaap-didactico (here is the problem)
    – snamp_contenidos (works well)

    If I make a copy with the structure of cideaap-didactico (with some non-hyphen name) and put some contents, your cache plugin works well on the copy, not with the original.

    Here is the code, tell me if do you need anything. Thanks

    {"meta":{"version":"2.7.16.2","build":1600096215},"pods":{"2708":{"id":2708,"name":"cideaap-didactico","label":"Cideaap Recursos didácticos","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"autor":{"id":2711,"name":"autor","label":"Autor","description":"","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":"0","unique":"0","text_placeholder":""},"adjunto":{"id":2712,"name":"adjunto","label":"Adjunto","description":"","help":"","class":"","type":"file","weight":1,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"any","file_add_button":"A?adir archivo","file_modal_title":"Incluír un archivo","file_modal_add_button":"A?adir archivo","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","file_show_edit_link":"0","file_field_template":"rows","file_allowed_extensions":""},"categoria":{"id":2728,"name":"categoria","label":"Categoría","description":"","help":"","class":"","type":"pick","weight":2,"pick_object":"post_type","pick_val":"cideaap-cat-rrdd","sister_id":"2724","required":"0","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_taggable":"0","pick_limit":"0","pick_allow_html":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_allow_add_new":"1","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"id_youtube":{"id":2835,"name":"id_youtube","label":"ID del video de youtube","description":"","help":"","class":"","type":"text","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""}},"show_in_menu":"1","label_singular":"Cideaap Recurso didáctico","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"cideapp-documento","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","menu_position":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","rest_enable":"1","rest_base":"cideaap-didacticos","read_all":"1","write_all":"0"},"3392":{"id":3392,"name":"snamp_contenidos","label":"SNAMP Contenidos","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"mostrar_en_menu":{"id":3393,"name":"mostrar_en_menu","label":"Mostrar en menu?","description":"","help":"","class":"","type":"boolean","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_allow_html":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Sí","boolean_no_label":"No","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"1","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0"},"imagen_principal":{"id":3394,"name":"imagen_principal","label":"Imagen principal","description":"","help":"","class":"","type":"file","weight":1,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_add_button":"A?adir archivo","file_modal_title":"Incluír un archivo","file_modal_add_button":"A?adir archivo","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_allow_html":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"1","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","file_show_edit_link":0,"file_allowed_extensions":"","file_field_template":"rows"},"principal":{"id":3400,"name":"principal","label":"Principal?","description":"","help":"","class":"","type":"boolean","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_allow_html":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Sí","boolean_no_label":"No","default_value":"0","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"1","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0"}},"show_in_menu":"1","label_singular":"SNAMP Contenido","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"snamp-contenido","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","menu_position":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","rest_enable":"1","rest_base":"snamp-contenidos","read_all":"0","write_all":"0"}}}

    Plugin Author Richard Korthuis

    (@rockfire)

    Hi @fedegonzal

    Thank you. Unfortunately I am still unable to reproduce the problem as both endpoints are cached fine on my local testing environment (see here).

    Hi Richard,

    I checked again and you are right, hyphen isn’t a problem. I guest could be an out of memory with a lot of contents and relations.

    That is, I’m loading 100 records by API call and each post have 3 levels of relations. On that situation, I have an expired cache instantly. I have been removed some relations and calling again my 100 records API the cache works well.

    Maybe its information is useful to you.

    Best, Federico

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Endpoint API Caches Expire Instantly’ is closed to new replies.