Comments (6)
This is strange. Number of rows in cache_visits2
should not exceed number_of_caches * (number_of_users + 2) in worst case, but in real life it should be even a lesser number. Some too old rows are deleted occasionally (randomly).
from opencaching-pl.
from opencaching-pl.
OK, I looked more closely.
- In fact there can be more rows than the upper limit defined above because in "usual" case the cache is viewed by a logged in user and the user's id is stored then, but if there is no current user id, that means a cache is viewed by someone who has not logged in, and there is setting in config that coordinates are shown for not logged-in users, the client IP is stored then. Run a select counting "valid" and "invalid" IPs and then you can compare numbers of logged-in visits against anonymous visits.
- 'C' means total visits for a particular cache while 'U' means last visit made by a particular user (or IP). The 'C' and 'U' are updated when the last visit of a cache for a current user was before given period counting from now.
So there is one thing I didn't notice before that is registering visits for not logged-in (anonymous) users when coordinates are shown.
from opencaching-pl.
from opencaching-pl.
Regarding your question: in general counter change is invoked by ViewCacheController
, so when you read cache data directly from DB or use another approach not involving mentioned controller, the counters shouldn't be changed.
The config settings suggests that opencaching.ro has coordinates visible for non logged-in visitors, so "IP visits" would be counted too. You could change settings to hide coordinates and see the effect, but I think you have them visible for other purposes.
On each attempt of increasing the counter, regardless of last visit period of current cache, there is a 1/1000 chance that "old" rows will be deleted. You could check how many "old" rows there are in database (search by "U" type
and visit_date < NOW() - 604800
).
Anyway, this functionality could be improved by f.ex. introduce a separate config settings for counting anonymous visits, a config setting for unique visit period (now it is hardcoded) and maybe a cron job to systematically remove "old" rows instead of a randomly invoked action as it is now.
from opencaching-pl.
from opencaching-pl.
Related Issues (20)
- Editing cache description without previously configured reactivation rule leads to issue with sending form HOT 6
- CacheSetAdmin - cacheSetsToArchive visibility question HOT 2
- Log picture removal link generation error
- PHP templating system changes - discussion HOT 18
- Provide up-to-date information about PHP and MySQL versions on official nodes HOT 4
- The regular user sees the option to edit the GeoPath description.
- Dynamic properties will be deprecated in PHP8.2 HOT 1
- Skrzynka moblina - geohotel - geokrety
- COG kopiowanie emaila usera HOT 2
- Add link to geopath in powerTrailCOG.php
- Add trim to GeoPathName - add and edit
- New OC devel VM (v9) HOT 6
- Picure in a log entry can destroy opencaching layout HOT 1
- Some style inconsistencies (?) HOT 1
- Automatic expansion of logs on mobile
- Potencial security vulnerability with cache verification.
- Huge quantity of database queries related to geokrety
- Cache title does not support UTF8 emoji HOT 1
- Geokrety cron does not handle too old lastupdate
- Google chats in geopaths don't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencaching-pl.