{"id":1761,"date":"2013-11-05T11:51:23","date_gmt":"2013-11-05T11:51:23","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1761"},"modified":"2013-11-05T11:51:23","modified_gmt":"2013-11-05T11:51:23","slug":"10-9-preferences-are-cached","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1761","title":{"rendered":"10.9: Preferences are cached"},"content":{"rendered":"<div>This had me stumped for a while while trying to restore my preference files. So, after copying or editing a plist, for example\u00a0<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">com.rstudio.desktop.plist<\/div><\/div>\n<p>\u00a0, just run\u00a0<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">defaults read com.rstudio.desktop<\/div><\/div>\n<p>\u00a0which should sync the cache. I&#8217;m mystified why apps would sync on startup, but by actually overwriting the plist instead of reading it in to sync. What sense does that make performance wise?<\/p><\/div>\n<div><\/div>\n<div>Another way I found is if the process &#8220;cfprefsd&#8221; is killed, the cache is cleared and refilled with what&#8217;s in the .plist files when it auto-restarts. However, there&#8217;s more than one such process; there&#8217;s one for &#8220;user&#8221; and one for &#8220;root&#8221; and perhaps more. I only kill the one belonging to me.<\/p>\n<p>I now have this in my bash .profile:<\/p>\n<p><tt>alias fixpref='killall -u yourusername cfprefsd'<\/tt><\/p>\n<p>It&#8217;s been working like a charm so far. I hope someone figures out what&#8217;s really going on here. The man page for &#8220;cfprefsd&#8221; is useless.<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This had me stumped for a while while trying to restore my preference files. So, after copying or editing a plist, for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1761","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1761"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1761\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}