I am thinking on using transient for my theme dynamic css in order to lower the site load.
Currently I have 15 php functions summed up in one collection function that do something like
$css .= $element_name . '{color:'. esc_attr($value) .';}';
so basically just processors.
The collection function is outputted only once in the head so I thought of using transient for the output. Thing is that the css processing changes depending on page so I need to name my transient properly,
I was thinking about
'theme_name_temp_css'.get_queried_object_id()
but I am not sure if I can rely on get_queried_object_id()
Are the ID's unique always or can it happen that 2 custom post types endup having same page ID 1 ?
Like portfolio and events.
To sum up,
Is get_queried_object_id() reliable to use with mixed post types ?
Would it be to much to use multiple transients ( for each wp page one ) ?
Should I use one transient for all pages ( an array )? It would be easier to remove it on theme settings change.