I tried doing something very similar to insomnix from the post 1 year 11 months ago, reply 15 in this thread.
In my template:
[[!Gallery? &album=`1` &thumbTpl=`sidebarImageRowTpl` &sort=`rand` &limit=`1`]]
sidebarImageRowTpl Chunk code:
<img src="[[!+image_absolute]]" alt="[[!+description]]" />
Only when I clear the cache, I get a new sort, which in my scenario displays a new image. I can see there is a file being generated in core/cache/default/gallery/item/list/. If I delete that file, I get a new image (as long as it doesn't, by chance, load the same one).
http://modx.com/extras/package/gallery
Changelog
---------
New in 1.5.1
- Add DB caching to Gallery and GalleryAlbums snippets, reducing page load times
I'm wondering if this change had anything to do with it, and why it was giving insomnix problems after upgrading from Gallery 1.4.0 to 1.5.2
Any ideas anyone? Could it be that &sort=`rand` is no longer effective with the change to DB caching? Is it something else? Or am I just doing something wrong?
Thanks in advance.